英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论