Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The heroku command exists in these Ruby versions?

After I updated my Ruby version with rbenv I wasn't able to use the Heroku command-line tool. I got this error:

> heroku
rbenv: heroku: command not found

The `heroku' command exists in these Ruby versions:
  2.0.0-p195

Reinstalling the tool belt from toolbelt.heroku.com didn't help.

like image 712
Sergiy Seletskyy Avatar asked Dec 24 '13 12:12

Sergiy Seletskyy


3 Answers

I switched to my previous Ruby version 2.0.0p195 and uninstalled the gem 'heroku'

rbenv global 2.0.0p195

gem uninstall heroku

Then I switched to the latest Ruby version 2.0.0p353 and reinstalled Toolbelt toolbelt.heroku.com

rbenv global 2.0.0p353
like image 87
Sergiy Seletskyy Avatar answered Sep 30 '22 12:09

Sergiy Seletskyy


If you're using rbenv, here are the steps I follow to fix this.

The error

rbenv: heroku: command not found

The `heroku' command exists in these Ruby versions:
  2.2.2

What to do

  1. rbenv local 2.2.2
  2. gem uninstall heroku
  3. rbenv rehash

Good to go!

like image 31
Jan Klimo Avatar answered Sep 30 '22 13:09

Jan Klimo


Heroku does not recommend using heroku gem from the recent times. If you have already installed the gem, uninstall the gem first with:

$ gem uninstall heroku

then install the toolbelt from Heroku as specified on Heroku site:

For ubuntu/debian:

$ wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

For other linux:

$ wget -qO- https://toolbelt.heroku.com/install.sh | sh

For Windows/MacOS see instructions on links.

like image 24
Малъ Скрылевъ Avatar answered Sep 30 '22 13:09

Малъ Скрылевъ