我正在尝试在 heroku 中部署一个应用程序。我正在使用 revel 框架,但是(我不知道这是否会成为一个问题)我之前没有使用过该框架......但是昨天我将我的代码移到了该框架中。 Web 应用程序在本地运行,但不能部署在 heroku 中。
这是我尝试“git push heroku master”时的输出
Counting objects: 46, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (46/46), 135.45 KiB | 0 bytes/s, done.
Total 46 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Using go1.6.3
remote: !! Installing package '.' (default)
remote: !!
remote: !!
remote: -----> Running: godep go install -v -tags heroku .
remote: can't load package: package ndc-console: no buildable Go source files in /tmp/tmp.XI5m2PPe7K/.go/src/ndc-console
remote: godep: go exit status 1
remote: ! Push rejected, failed to compile Go app.
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to ndc-console.
remote:
To https://git.heroku.com/ndc-console.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ndc-console.git'
知道我需要做什么吗? 谢谢。
最佳答案
您可以 build a slug locally ,正如@thwd 所建议的,但如果您还没有为 linux/amd64 构建,这可能有点棘手。 (我自己从来没有这样做过)
另一种选择是使用 build pack . Revel 的官方构建包在这里:https://github.com/robfig/heroku-buildpack-go-revel但我认为它已经过时了——你应该 fork 它并根据你的需要进行修复。 (这里是 my version)
关于git - 在 Heroku 上部署 revel 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40280909/