Open LuisAngelLucerosaldanaD opened 4 years ago
I can't test this (I'm on a Mac), but try the following:
Get GOPATH
:
go env GOPATH
You should be able to open the folder listed and see a folder called bin
. Check that sql-migrate
(or maybe sql-migrate.exe
is in the bin
folder. If it's not there, you most likely didn't install it correctly.
Add the full path to the bin folder
(I'm on MacOS, so my path looks like /Users/bbkane/go/bin
-ou're on Windows, so yours will look different) to your PATH environmental variable with these instructions
Even on my Mac, I was running into this issue. For me, since I use zsh for my terminal, I had to run:
code ~/.zshrc
Then put this line in the file:
export PATH="$PATH:/Users/landonschlangen/go/bin"
Once I did so, the sql-migrate command finally started working.
On windows go get does not provide executable.
Build requires gcc which usually is not installed
i'm programing in windows and when I execute answer me with "sql-migrate" is not recognized as an internal or external command, executable program or batch file. how should I set the environment variable in windows?