Error installing heroku gem

My goal is to push my rails app to Heroku. However, I wasn’t able to install the heroku gem.

If you get the following error when trying to do a gem install heroku –no-rdoc –no-ri

[ruby-1.9.3-p194] : (master) $ gem install heroku --no-rdoc --no-ri
Fetching: excon-0.16.10.gem (100%)
ERROR: Error installing heroku:
 invalid gem format for /Users/navid/.rvm/gems/ruby-1.9.3-p194@mygemsetname/cache/heroku-api-0.3.7.gem

After researching online there were two things that could potentially be the problem. The first is that there is that my machine doesn’t know about the heroku git repository. The second potential issue is that something in my rvm cache directory for the gemset needs to be deleted.

I was able to get around the issue above by first removing the /Users/navid/.rvm/gems/ruby-1.9.3-p194@mygemsetname/cache/heroku-api-0.3.7.gem directory and executing the following: git remote add heroku (replace rails_project_name with the name of your rails project)

Once I was able to install the heroku gem, I realized that the heroku gem has been deprecated.

! The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt.
 ! Download and install from:
 ! For API access, see:

Successfully installed heroku-2.33.5
1 gem installed

So go to and install Heroku Toolbelt

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Facebook Twitter Email

Leave a Reply