4

In attempting to deploy my own GO app using git push heroku master I get the error Push rejected, failed to detect set buildpack heroku/go

Because the error is quite specific about failure to detect a buildpack I tried manually setting it with the command heroku buildpacks:set heroku/go The response however was ! Thebuildpack heroku/go is already set on your app.

Despite this push attempts continue to produce the same error Push rejected, failed to detect set buildpack heroku/go

It seems like the error message is leading me astray, what else might be wrong? Following my research here, I made sure that there is a Procfile in the app folder and I was able to successfully follow all the steps for deploying the Heroku GO example beforehand.

ain
  • 22,394
  • 3
  • 54
  • 74
Adrian
  • 41
  • 2

1 Answers1

6

According to the documentation, the go buildpack requires Godep in order to know how to build and deploy your app.

Do a godep save and commit that before pushing to Heroku.

David Budworth
  • 11,248
  • 1
  • 36
  • 45
  • Thanks @David, that's firmly pointed me in the right direction but now I've go to work out what the GO "vendoring experiment" flag is about because `godep save -r ./...` is complaining about it. – Adrian Feb 20 '16 at 22:16
  • Do you have Go 1.6 and the latest godep? – elithrar Feb 20 '16 at 22:47
  • Hi @elithrar, yes Go 1.6 and latest godep. – Adrian Feb 21 '16 at 12:05
  • vendor experiment was for 1.5, if you are on 1.6, just do "godep save" it will create Godeps/Godeps.json (this is what heroku keys off of) and a vendor/... tree of your external dependencies. Which is a good practice so you don't get surprise library upgrades on a heroku deploy. – David Budworth Feb 21 '16 at 15:07
  • also, probably dont want to use -r, re-writing the imports will just make future upgrades harder. that's probably why it is complaining – David Budworth Feb 21 '16 at 15:08