rvmsudo 与 sudo?
我刚刚搬到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
工作起来就像一个魅力。有什么区别。屏幕后面发生了什么。有谁能解释一下吗..
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..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sudo
启动一个不包含环境变量的新子 shell。rvmsudo
传递 RVM 设置的任何环境变量,让您使用正确的 Ruby。这包括$PATH
以及$GEM_HOME
、$GEM_PATH
和$BUNDLE_PATH
变量。https://rvm.io/integration/sudo
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