Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rvm and gems, bundle show and gem list

Im using RVM with ruby on rails, when I do bundle install it shows a whole bunch more gems than when I do gem list? Something to do with rvm and which path its using?

bundle install

mds@db1:~/staging$ bundle
Using rake (0.9.6) 
Using Ascii85 (1.0.1) 
Using Platform (0.4.0) 
Using open4 (1.3.0) 
Using POpen4 (0.1.4) 
Using activesupport (2.3.17) 
Using rack (1.1.6) 
Using actionpack (2.3.17) 
Using actionmailer (2.3.17) 
Using activerecord (2.3.17) 
Using activeresource (2.3.17) 
Using acts_as_audited (1.1.1) 
Using addressable (2.2.8) 
Using builder (3.0.0) 
Using gyoku (1.0.0) 
Using nokogiri (1.5.6) 
Using akami (1.2.0) 
Using ar-extensions (0.9.5) 
Using cgi_multipart_eof_fix (2.5.0) 
Using chunky_png (1.2.5) 
Using cocaine (0.2.1) 
Using coderay (1.0.9) 
Using fssm (0.2.9) 
Using sass (3.1.18) 
Using compass (0.12.1) 
Using daemons (1.1.9) 
Using warden (0.10.7) 
Using devise (1.0.6) 
Using fastimage (1.2.13) 
Using html_compressor (0.0.3) 
Using rubyzip (0.9.8)
more gems......
Your bundle is complete!
It was installed into ./vendor/bundle

gem list

mds@db1:~/staging$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.17)
actionpack (2.3.17)
activerecord (2.3.17)
activeresource (2.3.17)
activesupport (2.3.17)
bundler (1.3.5)
bundler-unload (1.0.1)
daemon_controller (1.1.4)
fastthread (1.0.7)
passenger (3.0.19)
rack (1.5.2, 1.1.6)
rails (2.3.17)
rake (10.1.0)
rubygems-bundler (1.2.2)
rvm (1.11.3.8)
like image 411
Francois Avatar asked Oct 04 '22 11:10

Francois


2 Answers

this happens when you use bundle install --deployment or bundle install --path=..., it generates .bundle/config with something like this:

---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'

it could be done by one of you coworkers or the bundler/capistrano integration:

  1. if it was your coworker then just remove and ignore it:

    rm -rf .bundle
    echo '.bundle' >> .gitignore
    
  2. for capistrano rvm-capistrano describes how to disable it => https://github.com/wayneeseguin/rvm-capistrano#disabling-bundle---deployment-when-using-gemsets

like image 96
mpapis Avatar answered Oct 07 '22 19:10

mpapis


before doing gem list make sure you use the application's gemset:

rvm use application_ruby@application_gemset
gem list

Be sure to replace application_ruby with your ruby version string and application_gemset to the gemset that is used by your rails application

like image 36
Konstantin Rudy Avatar answered Oct 07 '22 18:10

Konstantin Rudy