如何在sinatra / rack应用程序中加载分叉的github repo作为gem [英] How to load forked github repo as gem in sinatra/rack application
问题描述
我正在尝试使用名为rbing的gem,但存在问题,该项目已被放弃,但有人对repo进行了修复,因此我决定使用bundler指定新版本。 p>
gemrbing,:git => https://github.com/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到:
来源https://rubygems.org
gem'sinatra'
gem'rbing',:git => 'https://github.com/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 => "https://github.com/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 "https://rubygems.org"
gem 'sinatra'
gem 'rbing', :git => 'https://github.com/KellyMahan/rbing'
I just did it here for RubyMine 5.4 and it works like a charm:
这篇关于如何在sinatra / rack应用程序中加载分叉的github repo作为gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!