nirasan's tech blog

趣味や仕事の覚え書きです。Linux, Perl, PHP, Ruby, Javascript, Android, Cocos2d-x, Unity などに興味があります。

Go 言語のアプリを heroku にデプロイするときは vender を .gitignore にいれるとだめ

  • ビルドエラーになる
  • godep 使わせている意味なくない?
  • デプロイ用のブランチ作って .gitignore から外すとかするのかな?
$ git push heroku master
Counting objects: 280, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (260/260), done.
Writing objects: 100% (280/280), 36.31 KiB | 0 bytes/s, done.
Total 280 (delta 123), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Go app detected
remote: -----> Checking Godeps/Godeps.json file.
remote: -----> Installing go1.6... done
remote: -----> Running: godep go install -tags heroku ./...
remote: my_go_file.go:5:2: cannot find package "any/dep/package" in any of:
... 略 ...
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 myapp.
remote:
To https://git.heroku.com/myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myapp.git'