【发布时间】:2015-10-26 04:54:55
【问题描述】:
我有bundle exec 工作正常,但是当我尝试执行sudo bundle exec 时,我有Could not find 'bundler' (>= 0) 错误。
这是完整的错误消息。
smcho@macho appname> sudo bundle exec unicorn -c config/unicorn.rb -E production -D
/Users/smcho/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'bundler' (>= 0) among 11 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/smcho/.gem/ruby/2.2.0:/Users/smcho/.rvm/rubies/ruby-2.2.3/lib/ruby/gems/2.2.0', execute `gem env` for more information
from /Users/smcho/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/smcho/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/smcho/.rvm/gems/ruby-2.2.3/bin/bundle:22:in `<main>'
from /Users/smcho/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/smcho/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
我找到了许多与此问题相关的问题/答案,但似乎没有任何效果。
-
Using $ sudo bundle exec ... raises 'bundle: command not found' error
- 我尝试了这篇文章的答案,但没有任何效果。无论如何,我的错误信息不是
bundle: command not found。
- 我尝试了这篇文章的答案,但没有任何效果。无论如何,我的错误信息不是
-
Why is sudo: bundle command not found?
-
$ echo 'echo $PATH' | sh和$ echo 'echo $PATH' | sudo sh的结果相同
-
【问题讨论】: