Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toolbelt install: Could not find gem Heroku

Tags:

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.

like image 713
Cleverlemming Avatar asked Sep 24 '12 22:09

Cleverlemming


1 Answers

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

like image 53
Rob Cooper Avatar answered Nov 23 '22 19:11

Rob Cooper