我刚搬到RVM。
sudo bundle install给了我错误: -
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>'
和
rvmsudo bundle install
就像一个魅力。有什么不同。什么在屏幕后面发生。任何人都可以解释..
答案 0 :(得分:50)
sudo
启动一个不包含环境变量的新子shell
rvmsudo
传递RVM设置的任何环境变量,以使您获得正确的Ruby。这包括$PATH
以及$GEM_HOME
,$GEM_PATH
和$BUNDLE_PATH
变量。
http://ruby.about.com/od/rubyversionmanager/qt/Rvm-And-Sudo.htm