如何在sinatra / rack应用程序中加载分叉的github repo作为gem

编程入门 行业动态 更新时间:2024-10-25 04:27:12
本文介绍了如何在sinatra / rack应用程序中加载分叉的github repo作为gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用名为rbing的gem,但存在问题,该项目已被放弃,但有人对repo进行了修复,因此我决定使用bundler指定新版本。 p>

gemrbing,:git => github/KellyMahan/rbing.git

甚至当我安装运行bundle install,但在我的Gemfile中,RubyMine抱怨说:具有指定版本要求的gem在SDK RVM中不可用:ruby-2.0.0

它不会显示在我的外部库目录中。

任何帮助都非常感谢球员, 亚当

编辑:Ruby版本,

Bundler 1.3.5 Ruby 2.0.0(2013- 05-14 patchlevel 195)[x86_64-darwin12.3.0] Rubygems 2.0.3 rvm 1.20.11(stable) GEM_HOME /Users/adam419/.rvm/gems/ruby-2.0 .0-p195 GEM_PATH /Users/adam419/.rvm/gems/ruby-2.0.0-p195:/Users/adam419/.rvm/gems/ruby-2.0.0- p195 @ global rubygems-bundler(1.1.1)

解决方案

更改您的Gemfile到:

来源rubygems gem'sinatra' gem'rbing',:git => 'github/KellyMahan/rbing'

我刚刚在RubyMine 5.4它就像一个魅力:

I'm trying to use a gem called "rbing" but there is an issue with it and the project has been abandoned but someone made a fix in a repo so I decided to use bundler to specify the new version.

gem "rbing", :git => "github/KellyMahan/rbing.git"

It even installed correctly when I ran bundle install, but inside my Gemfile RubyMine is complaining that "The gem with the specified version requirements isn't available inside SDK RVM: ruby-2.0.0"

And it doesn't show up in my external libraries directory.

Any help is very much appreciated guys,

Cheers, Adam

EDIT: Ruby version,

Bundler 1.3.5 Ruby 2.0.0 (2013-05-14 patchlevel 195) [x86_64-darwin12.3.0] Rubygems 2.0.3 rvm 1.20.11 (stable) GEM_HOME /Users/adam419/.rvm/gems/ruby-2.0.0-p195 GEM_PATH /Users/adam419/.rvm/gems/ruby-2.0.0-p195:/Users/adam419/.rvm/gems/ruby-2.0.0- p195@global rubygems-bundler (1.1.1)

解决方案

Change your Gemfile to:

source "rubygems" gem 'sinatra' gem 'rbing', :git => 'github/KellyMahan/rbing'

I just did it here for RubyMine 5.4 and it works like a charm:

更多推荐

如何在sinatra / rack应用程序中加载分叉的github repo作为gem

本文发布于:2023-07-04 17:23:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1027045.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   加载   如何在   sinatra   gem

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!