Description
Issue while installing soda cli in existing app I downloaded the cli like the documentation https://gobuffalo.io/en/docs/db/toolbox
Steps to Reproduce the Problem
$ go get github.com/gobuffalo/pop/... $ go install github.com/gobuffalo/pop/soda
Expected Behavior
when i write soda -v it must show soda version
Actual Behavior
soda: command not found
Info
OS: ubuntu 21
CodePudding user response:
The problem is very probably that the path where the soda binary gets installed is not in your PATH system variable.
To know where your go binaries are installed, run:
go env | grep GOPATH
This will print:
GOPATH="/path/to/go"
Then you need to add /path/to/go/bin in your environment, through your .bashrc, .zshrc, .profile or whatever you need to have it in your environment, adding the line:
export PATH="$PATH:/path/to/go/bin"
You can do all of this in one single command:
echo "export PATH=\"\$PATH:${$(go env | grep GOPATH | cut -d '=' -f2):1:-1}/bin\"" >> .bashrc
CodePudding user response:
If soda is installed inside go/bin
Just add an alias for soda
Open your terminal and write this command
alias soda="~/go/bin/soda"
