Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't the command `gem list` include gems installed with bundler's :git option?

In our rails 3.2 Gemfile, there are some gems installed with option :git pointing to repo on github, such as:

gem 'ruote', :git => 'http://github.com/jmettraux/ruote.git'

After bundle install, we type gem list to list all the gems installed. However gem list does not list ruote as a gem installed. As a matter of fact, there is no ruote listed at all. We notice the same thing also happens to all rails engines which are installed with option :git pointing to repo on github. Why gem list does not list all gems installed? How can we assure that ruote is correctly installed?

like image 374
user938363 Avatar asked Dec 16 '13 01:12

user938363


2 Answers

According to the Bundler Documentation, gems from git sources will not show up in gem list because the gem command cannot process them, so Bundler has to do all of the work by itself. Bundler stores these gems in its own location instead. (Note that this location has nothing to do with the current project. It is in ~/.bundler/... by default.)

You can see that it is installed if bundle install completes with no errors. You can also use bundle show to see the list of gems that Bundler has set up for you.

like image 174
Moshe Katz Avatar answered Oct 16 '22 10:10

Moshe Katz


gem list is not the right way to show gems installed for the app, as it will show system wide gems.

To check what gems are for this app and their versions, check Gemfile.lock. You'll have the most precise info there.

like image 25
Billy Chan Avatar answered Oct 16 '22 09:10

Billy Chan