Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing a gem from Github with Bundler

I am trying to use the instructions here to install a pre-released version of a gem with bundler.

The "bundle install" output lists the gem as getting installed, but "gem list" fails to find it.

My Gemfile:

source :gemcutter

gem 'sinatra', '1.1.0', :git => 'http://github.com/sinatra/sinatra.git'
gem 'RedCloth', '4.2.3'

Here is a gist with the rest of my sample code.

Has anyone gotten this scenario to work?

NOTE: I am also using RVM (on OS X). bundle show does list the gem (and dependencies) as existing, but I am not able to properly resolve them.

Thanks.

like image 503
Scott Watermasysk Avatar asked Oct 02 '10 17:10

Scott Watermasysk


1 Answers

I would look at the load paths, and further debug from there, example:

...(master) $ irb
irb(main):001:0> $LOAD_PATH.count
=> 8
irb(main):004:0> require 'bundler/setup'
=> true
irb(main):005:0> $LOAD_PATH.count
=> 112
irb(main):006:0> 

Bundler configures the load path for you, this means not all the gems are included on your load path by default.

Additionally, from the bundler git help:

Because Rubygems lacks the ability to handle gems from git, any gems installed from a git repository will not show up in gem list. They will, however, be available after running Bundler.setup.

Best regards, hope this helps

ED

like image 60
chischaschos Avatar answered Oct 22 '22 19:10

chischaschos