Specify a plugin as gem from github in Gemfile

Madhusudhan picture Madhusudhan · Nov 11, 2010 · Viewed 11.2k times · Source

I am including 'acts_as_rateable' gem in my Gemfile like this

gem 'acts_as_rateable', :git => 'git://github.com/azabaj/acts_as_rateable.git'

and then when I do bundle install it gives me this error message!

Could not find gem 'acts_as_rateable (>= 0, runtime)' in git://github.com/azabaj/acts_as_rateable.git (at master). Source does not contain any versions of 'acts_as_rateable (>= 0, runtime)'

I am developing a plugin of my own, when I include that, even that gives the same error like this..

I assume this has something to do with the gemspec?

Please help

Rails version : 3.0.1 Rubygems version : 1.3.7 Bundler version : 1.0.3

let me know if you need any other details..

Answer

Richard Peck picture Richard Peck · Sep 20, 2013

If you want to pull a gem directly from GitHub, you can put this into your GemFile:

gem 'twitter', github: 'sferik/twitter'

Which will use the default branch. To specify the branch to use:

gem 'twitter', github: 'sferik/twitter', branch: 'branch_name'