6

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.

Cleverlemming
  • 1,310
  • 1
  • 8
  • 10

1 Answers1

21

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 :)

Rob Cooper
  • 28,567
  • 26
  • 103
  • 142
  • Worked for me, thank you. The 2nd step is to run '$ gem env', find 'EXECUTABLE DIRECTORY:' path and browse to 'bin' directory under that path. – Tatiana Tyu Nov 28 '12 at 11:17
  • Edited to make it a bit clearer, thanks - the 2nd step was kinda two steps in one :) – Rob Cooper Nov 29 '12 at 13:11
  • I tried this but am running into this issue: http://stackoverflow.com/questions/13674686/heroku-toolbelt-install-problems – cman77 Dec 02 '12 at 23:24
  • I think [the answer from mpapis](http://stackoverflow.com/a/13677501/832) should probably fix that. Definitely looks like an unrelated RVM issue. – Rob Cooper Dec 03 '12 at 07:01
  • Removing the outdated gem fixed the issue for me. – MBHNYC Feb 07 '13 at 05:56