看起來像捆綁器安裝在我的機器上,但我運行時出現錯誤bundle -v
。如何修復Ruby gem bundler安裝?
錯誤:
/Library/Ruby/Site/2.0.0/rubygems/dependency.rb:308:in `to_specs': Could not find 'bundler' (>= 0) among 71 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/username/.gem/ruby/2.0.0:/Library/Ruby/Gems/2.0.0:/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0', execute `gem env` for more information
from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:320:in `to_spec'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/bundle:22:in `<main>'
我不知道什麼是錯的!
更新:
我無法從gem list
找到捆綁當我運行which bundle
,我看到了輸出/usr/local/bin/bundle
在那個位置我看到bundle
和bundler
可執行文件。
當我運行sudo gem install bundler
,我通過禁用系統完整性保護得到下面的錯誤
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/bundle
這是你的系統的Ruby。你使用'rbenv'還是'rvm'? – tadman
另外,您如何知道捆綁器已安裝? –
'gem list bundler'來查看它是否存在 – Cyzanfar