Reputation: 894
I'm having some trouble getting it detect the application binary.
For example, my project is called GoServer which is located in $GOPATH/src/GoServer
and its binary (which was created by running go install
in the project directory) is located in $GOPATH/bin/
Now if I try to run the instance locally using go run main.go
it works just fine. If I run it locally using the Heroku Local toolkit (heroku local
) it also works fine. BUT when it push to Heroku's remote repo and open the page from there, it crashes. In the logs it says that it could not find GoServer (bash: GoServer: command not found
).
How can I fix this? Most of the similar issues threads I've seen refer to a misconfigured GOPATH
but mine seems to be fine since Heroku Local works, but not the actual remote setup.
Upvotes: 2
Views: 569
Reputation: 417572
The package in your glide.yaml
is incorrect, change it to the package your code is in, that is GoServer
. This is the package that gets installed by glide. Since this did not match the package (folder) of your code, GoServer
did not get installed and was not available as an executable on heroku. It worked for you locally as you (or your IDE) compiled and installed GoServer
and placed the executable into $GOPATH/bin
, and so it could be run locally.
So the first line in glide.yaml
should be:
package: GoServer
Upvotes: 2