在Heroku上部署Go应用程序。

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

Go: deploy on Heroku

问题

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

-----> 正在获取自定义的git构建包... 完成
-----> 检测到Go应用
-----> 安装go1.4... 完成

       厌倦了等待bzr和hg吗?
       尝试使用github.com/kr/godep进行更快的部署。

       安装Virtualenv... 完成
       安装Mercurial... 完成
       安装Bazaar... 完成
-----> 正在运行:go get -tags heroku ./...
go install: GOPATH之外的目录/tmp/build_2c4fa2d4b9d0408123831030713fa930/.heroku/g/src没有安装位置

 !     推送被拒绝,无法编译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

-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing go1.4... done

       Tired of waiting for bzr and hg?
       Try github.com/kr/godep for faster deploys.

       Installing Virtualenv... done
       Installing Mercurial... done
       Installing Bazaar... done
-----> Running: go get -tags heroku ./...
go install: no install location for directory /tmp/build_2c4fa2d4b9d0408123831030713fa930/.heroku/g/src outside GOPATH

 !     Push rejected, failed to compile Go app

What did I miss? Thanks

答案1

得分: 0

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

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

之后在项目目录中执行

godep save

更多信息请参考文章

英文:

To fix it you should get Godep

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

after that in project directory

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:

确定