8

When I run this command

ginkgo bootstrap 

I am getting this error

zsh: command not found: ginkgo 

I have already installed ginkgo using the following command

go get -u github.com/onsi/ginkgo/ginkgo 

I am unable to understand what I am doing wrong?

4
  • "I have already installed ginkgo using the following command go get -u github.com/onsi/ginkgo/ginkgo". No you didn't. go install is used to install commands. go get is used to track dependencies. Commented Jan 27, 2022 at 11:47
  • be sure your PATH env variable is configured correctly. See stackoverflow.com/a/21012349/2270041 Commented Jan 27, 2022 at 13:06
  • Even after using go install, the problem persists still. Any idea how to solve this. Commented Jan 27, 2022 at 15:39
  • be sure you have the $GOPATH env variable setted (just echo $GOPATH ) and double check the ginkgo is located in the $GOPATH/bin/ginkgo path Commented Jan 27, 2022 at 15:46

1 Answer 1

20

After installing Ginkgo as described here, for example the latest version:

go env -w GO111MODULE=on go install github.com/onsi/ginkgo/v2/ginkgo@latest go get github.com/onsi/gomega/... 

Make sure GO bin is in your PATH:

go env GOPATH # /home/user/go export PATH=$PATH:$(go env GOPATH)/bin 

Now try to run Ginkgo:

ginkgo bootstrap Generating ginkgo test suite bootstrap for temp in: temp_suite_test.go 
Sign up to request clarification or add additional context in comments.

1 Comment

this worked for me. i only had to start at the "Make sure GO bin is in your PATH" part. thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.