git - 在 Heroku 上部署 revel 应用程序

标签 git heroku go revel

我正在尝试在 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/

相关文章:

python - Django collectstatic 不覆盖生产文件

ruby-on-rails - Authlogic 在 Heroku 上抛出错误

google-app-engine - 我们应该将 App Engine 上下文存储在全局变量中还是为每个请求都创建它?

heroku - 生产应用程序中断。 "H20 - App boot timeout"

go - 无法生成覆盖文件

go - 在 Go 中使用 JSON 请求中的嵌套数组

VSCode 上的 Git 和 Git : samba shared folder issue

git - 为什么 Google 存储库会同步到 headless 状态

git - 将我在提交中更改的行中的空格转换为制表符

git - 如何将最后一次 git commit 编辑为补丁文件?