Heroku command not found

前端 未结 12 1037
北海茫月
北海茫月 2021-02-01 03:06

After installing Heroku Toolbelt, in terminal on Mac when trying to run the following command:

heroku

I get the error:

bash: he         


        
相关标签:
12条回答
  • 2021-02-01 03:45

    Just run

    $ gem install heroku
    

    Form your app that's it.

    0 讨论(0)
  • 2021-02-01 03:46

    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:

    1. brew tap heroku/brew && brew install heroku

    or Ubuntu

    sudo snap install --classic heroku

    0 讨论(0)
  • 2021-02-01 03:47

    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
    
    0 讨论(0)
  • 2021-02-01 03:51

    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.

    0 讨论(0)
  • 2021-02-01 03:57

    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.

    0 讨论(0)
  • 2021-02-01 03:59

    I am using zsh which didn't have snap in its path. So just add this in ~/.zshrc.

    export PATH=$PATH:/snap/bin

    0 讨论(0)
提交回复
热议问题