Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Heroku Toolbelt on Windows 10

I've been having some issues installing the Heroku toolbelt on Windows 10, 64-bit.

It's the first time I install Heroku. I downloaded it from https://toolbelt.heroku.com/windows.

After installing, I tried launching a new Git Bash and typing heroku login but what I got back was bash: heroku: command not found

Running the same command on Windows Powershell, what I got back was

'MYSQL' is not recognized as an internal or external command,
operable program or batch file.
'MYSQL' is not recognized as an internal or external command,
operable program or batch file.

Any suggestions? I thought that googling those lines would help, but I haven't found much.

I followed the recommendation from here, but now when typing heroku login on the Powershell, nothing happens. Nothing changes on the Git Bash.

I checked, and the Heroku folder was added to the PATH.

I thought I'd ask for some help before installing anything else.

Thank you!

like image 865
Sammy I. Avatar asked Nov 25 '15 03:11

Sammy I.


People also ask

What is heroku toolbelt?

The Heroku Toolbelt is a package of the Heroku CLI, Foreman, and Git — all the tools you need to get started using Heroku at the command line. The Toolbelt is available as a native installer for OS X, Windows, and Debian/Ubuntu Linux. The Toolbelt has been available since last fall as part of our polyglot platform.

How do I install heroku CLI?

To install the Heroku CLI on Windows, download the 64-bit installer for Windows. Open the installer on your machine and follow the prompts to complete the installation. Once the installation is complete, open Git Bash.

How do you check heroku CLI is installed or not?

Open Command Prompt by right-clicking the Start Menu, choose Run, enter cmd and click OK. Now type heroku and press enter. If you receive a help message, heroku-cli was installed successfully.


2 Answers

bash: heroku: command not found

The error message is clear: Bash cannot find the heroku command, it's not on your PATH.

I checked, and the Heroku folder was added to the PATH.

It seems you didn't check it correctly. Note that even if it looks correct in the PATH settings window, Git Bash might have a different PATH configured. To see the PATH in Git Bash, run:

echo $PATH

When debugging path issues, it's best to first run heroku with the absolute path. For example if it's in C:\Program Files\Heroku\bin\heroku then you can run in Git Bash with:

/c/Program\ Files/Heroku/bin/heroku login

If this works (and it should), then you can add it to PATH like this:

PATH="$PATH:/c/Program\ Files/Heroku/bin"

Note that Heroku will likely need other programs too on the PATH, such as MySQL and Ruby. Find their absolute paths, and add there directories to PATH the same way as heroku itself in the above example.

If instead of Git Bash, you want to work in CMD, the procedure is the same, but the syntax to print and set PATH is different:

echo %PATH%
set PATH="C:\Program Files\Heroku\bin;%PATH%"
like image 102
janos Avatar answered Oct 02 '22 13:10

janos


In windows bash instead of this

PATH="$PATH:/c/Program\ Files/Heroku/bin" 

use this

 PATH="$PATH:/c/Program Files/Heroku/bin"
like image 39
Serge Nikolaev Avatar answered Oct 02 '22 14:10

Serge Nikolaev