我正在尝试使用这个buildpack https://github.com/robfig/heroku-buildpack-go-revel在Heroku上使用Go和Revel,但它似乎不起作用:
我在尝试使用基本的revel helloworld示例时遇到错误。
$ go get github.com/robfig/helloworld
$ cd $GOPATH/src/github.com/robfig/helloworld
$ echo "github.com/robfig/helloworld" > .godir
$ git add .godir
$ git commit -a -m ".godir"
$ heroku create -b https://github.com/robfig/heroku-buildpack-go-revel.git
$ git push heroku master
Counting objects: 34, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (34/34), 57.41 KiB | 0 bytes/s, done.
Total 34 (delta 1), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Revel app detected
-----> Installing Go 1.1.2... done
Installing Virtualenv... done
Installing Mercurial... done
Installing Bazaar... done
-----> Running: go get -tags heroku ./...
mv: cannot stat `/tmp/build_86bd3433-7925-4ae9-b4bf-f5466525aef1/.go/bin/*': No such file or directory
! Push rejected, failed to compile Revel app
To git@heroku.com:peaceful-hamlet-6152.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:peaceful-hamlet-6152.git'
答案 0 :(得分:3)
我分叉了heroku-buildpack-go-revel并且能够修复移动不存在的目录的错误(我将其更改为有条件地移动它)。
修复了buildpack:
然后我能够将一个helloworld狂欢应用程序部署到heroku:
export GOPATH=$HOME/go
mkdir $GOPATH
go get github.com/dougnukem/revel-helloworld
cd $GOPATH/src/github.com/dougnukem/revel-helloworld
heroku create
heroku config:set BUILDPACK_URL=https://github.com/dougnukem/heroku-buildpack-go-revel.git
git push heroku master
heroku open
我提交了一个带有该修复的拉取请求: