在Heroku上部署Go应用程序。

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

Go: deploy on Heroku

问题

通过这篇文章的帮助,我正在尝试将Go语言应用部署到Heroku。问题是在部署过程中出现了错误。

  1. -----> 正在获取自定义的git构建包... 完成
  2. -----> 检测到Go应用
  3. -----> 安装go1.4... 完成
  4. 厌倦了等待bzrhg吗?
  5. 尝试使用github.com/kr/godep进行更快的部署。
  6. 安装Virtualenv... 完成
  7. 安装Mercurial... 完成
  8. 安装Bazaar... 完成
  9. -----> 正在运行:go get -tags heroku ./...
  10. go install: GOPATH之外的目录/tmp/build_2c4fa2d4b9d0408123831030713fa930/.heroku/g/src没有安装位置
  11. ! 推送被拒绝,无法编译Go应用

我错过了什么?谢谢

英文:

With help of the article I'm trying to deploy Go-lang app to heroku. The problem is I get an error while deploying

  1. -----> Fetching custom git buildpack... done
  2. -----> Go app detected
  3. -----> Installing go1.4... done
  4. Tired of waiting for bzr and hg?
  5. Try github.com/kr/godep for faster deploys.
  6. Installing Virtualenv... done
  7. Installing Mercurial... done
  8. Installing Bazaar... done
  9. -----> Running: go get -tags heroku ./...
  10. go install: no install location for directory /tmp/build_2c4fa2d4b9d0408123831030713fa930/.heroku/g/src outside GOPATH
  11. ! Push rejected, failed to compile Go app

What did I miss? Thanks

答案1

得分: 0

为了修复它,你应该获取Godep

  1. go get github.com/kr/godep
  2. export PATH=$PATH:$GOPATH/bin

之后在项目目录中执行

  1. godep save

更多信息请参考文章

英文:

To fix it you should get Godep

  1. go get github.com/kr/godep
  2. export PATH=$PATH:$GOPATH/bin

after that in project directory

  1. godep save

more information in the artice

答案2

得分: 0

Heroku现在官方支持Go,并提供入门指南和其他文档

英文:

Heroku now officially supports Go and has a Getting Started guide and other docs.

huangapple
  • 本文由 发表于 2014年12月17日 06:52:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/27515454.html
匿名

发表评论

匿名网友

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

确定