0

我正在尝试使用此 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'
4

1 回答 1

3

我分叉了 heroku-buildpack-go-revel 并能够修复移动不存在目录的错误(我将其更改为有条件地移动它)。

固定构建包:

然后我能够将一个 helloworld revel 应用程序部署到 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

我提交了一个带有该修复程序的拉取请求:

于 2013-10-13T15:23:42.897 回答