After installing Heroku Toolbelt, in terminal on Mac when trying to run the following command:
heroku
I get the error:
bash: he
Just run
$ gem install heroku
Form your app that's it.
Ran gem install heroku
first and it gave me the following message:
heroku must be installed from cli.heroku.com. This gem is no longer available. (RuntimeError)
Steps from Heroku:
brew tap heroku/brew && brew install heroku
or Ubuntu
sudo snap install --classic heroku
First install heroku:
wget -qO- https://toolbelt.heroku.com/install.sh | bash
After that add a symlink to binary like @Garrett did:
sudo ln -s /usr/local/heroku/bin/heroku /usr/bin/heroku
After installing Heroku Toolbelt using the .pkg file I downloaded from Heroku's Getting Started with Rails 4.x on Heroku page, I got the heroku command not found message
. My /usr/local/heroku/bin
folder did exist.
I was able to resolve this issue by going to https://toolbelt.heroku.com and downloading the same .pkg file from that site and re-installing it. Note, I did not uninstall the previous package first.
when you install heroku in linux as per the documentation using
sudo snap install heroku --classic
it will install heroku inside /snap/bin/heroku
but when you type the command in terminal it will look into /usr/bin/ directory,
a simple solution is to create a symlink by
sudo ln -s /snap/bin/heroku /usr/bin/heroku
after that you can just run the heroku
command in terminal.
I am using zsh which didn't have snap
in its path. So just add this in ~/.zshrc
.
export PATH=$PATH:/snap/bin