如何让Heroku检测到GO构建包?

huangapple go评论85阅读模式
英文:

How to get Heroku to detect GO buildpack

问题

尝试使用git push heroku master部署我的GO应用程序时,我遇到了错误Push rejected, failed to detect set buildpack heroku/go

由于错误非常明确地指出无法检测到构建包,我尝试使用命令heroku buildpacks:set heroku/go手动设置它。
然而,响应是! Thebuildpack heroku/go is already set on your app.(构建包 heroku/go 已经在您的应用程序上设置。)

尽管如此,推送尝试仍然产生相同的错误Push rejected, failed to detect set buildpack heroku/go

看起来错误消息误导了我,还可能有什么其他问题?根据我的研究,我确保应用程序文件夹中有一个 Procfile,并且我能够成功地按照部署 Heroku GO 示例的所有步骤进行操作。

英文:

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.

答案1

得分: 6

根据文档,go buildpack需要Godep来了解如何构建和部署你的应用程序。

在推送到Heroku之前,执行godep save并提交更改。

英文:

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.

huangapple
  • 本文由 发表于 2016年2月20日 22:36:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/35524704.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定