I just moved to RVM.
sudo bundle install gives me and error:-
sudo bundle install /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError) from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem' from /usr/local/rvm/gems/ruby-1.9.2-p180/bin/bundle:18:in `<main>'
and
rvmsudo bundle install
works like a charm. Whats the difference. Whats going on behind the screen. Can anybody explain..
sudo
starts a new subshell that does not contain environment variables.rvmsudo
passes on any environment variables that RVM set up to get you to the correct Ruby. This includes the $PATH
as well has $GEM_HOME
, $GEM_PATH
and $BUNDLE_PATH
variables.
https://rvm.io/integration/sudo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With