本文介绍了Toolbelt安装:找不到gem Heroku的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从我的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 /本地/ MySQL的/斌:/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:在`report_activate_error'中:从/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby找不到RubyGem heroku(> = 0)(Gem :: LoadError)
/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



解决方案

我遇到了同样的问题。


  • 卸载Gem gem uninstall heroku (选择'All Versions')。 找到您的Ruby'bin'路径通过运行 gem env (位于'可执行目录:')

  • cd bin 文件夹中。 删除Heroku可执行文件<$ c

  • 重新启动您的shell(关闭终端标签并重新打开)

  • 点击 heroku version ,您现在应该看到如下所示的内容:


heroku -toolbelt / 2.33.1(x86_64-darwin10.8.0)ruby / 1.9.3



现在您可以 heroku登录按照并回到黑客行为:)


I get an "Could not find RubyGem heroku (Gem::LoadError)" when I try to execute any Heroku commands from terminal in my app directory. Have tried wiping and reinstalling Toolbelt, as well as any previously installed Heroku gems.

Using the full path works and--app name works (/usr/bin/heroku config--app myapp-stage). Using 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

Thanks in advance for any help or advice.

解决方案

I had the same problem.

  • Uninstall the Gem gem uninstall heroku (Select 'All Versions').
  • Find your Ruby 'bin' path by running gem env (it's under 'EXECUTABLE DIRECTORY:')
  • cd to the bin folder.
  • Remove the Heroku executable rm heroku
  • Restart your shell (close Terminal tab and re-open)
  • Hit heroku version, you should now see something like:

heroku-toolbelt/2.33.1 (x86_64-darwin10.8.0) ruby/1.9.3

Now you can heroku login as per their instructions and get back to hacking :)

这篇关于Toolbelt安装:找不到gem Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 18:17