How to load forked github repo as gem in sinatra/rack application

穿精又带淫゛_ 提交于 2019-12-11 02:48:29

问题


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)

回答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:



来源:https://stackoverflow.com/questions/19129880/how-to-load-forked-github-repo-as-gem-in-sinatra-rack-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!