当我尝试从我的app目录中的终端执行任何Heroku命令时,我得到“找不到RubyGem heroku(Gem :: LoadError)”。尝试过擦拭和重新安装Toolbelt,以及任何以前安装的Heroku宝石。
使用完整路径工作和 - 应用程序名称工作(/ usr / bin / heroku config - app myapp-stage)。使用OS X 10.8.1。
echo $PATH
/Users/johndoe/.rvm/gems/ruby-1.9.3-p194@llctlc/bin:/Users/johndoe/.rvm/gems/ruby-1.9.3 p194@global/bin:/Users/johndoe/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/johndoe/.rvm/bin:/Users/johndoe/.gem/ruby/1.8/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/bin/heroku:/opt/local/sbin:/opt/local/bin:/usr/local/mysql/bin:/Users/johndoe/.ec2/bin:/usr/local/git/bin
$ heroku
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /Users/johndoe/.gem/ruby/1.8/bin/heroku:18
提前感谢您的任何帮助或建议。
答案 0 :(得分:21)
我遇到了同样的问题。
gem uninstall heroku
(选择“所有版本”)。gem env
(位于“EXECUTABLE DIRECTORY:
”下cd
到bin
文件夹。rm heroku
heroku version
,您现在应该看到类似的内容: heroku-toolbelt/2.33.1 (x86_64-darwin10.8.0) ruby/1.9.3
现在您可以按their instructions heroku login
并重新开始黑客攻击:)