Grails 3:无法推送到heroku

时间:2017-10-01 15:32:33

标签: git grails heroku

我正在将当前的git存储库推送到heroku中。该在线应用程序是使用Grails 3和IntelliJ开发的。而且我不知道如何解决这个错误。

Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (5/5), 400 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 5 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/gradle.tgz
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to desolate-springs-99606.
remote: 
To https://git.heroku.com/desolate-springs-99606.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/desolate-springs-99606.git'

2 个答案:

答案 0 :(得分:1)

错误表明您的应用与Gradle buildpack不兼容。我不熟悉Grails框架,如何将它部署到Heroku,所以我无法给你具体的答案。但您应该按照Gradle buildpack的说明操作。 Buildpack正在检查三个文件gradlewbuild.gradlesettings.gradle。如果您已在应用程序的目录中包含这些文件,请确保它们已提交。

答案 1 :(得分:1)

Heroku只会自动检测Grails 2.0应用程序。

要部署Grails 3.0,您需要关注Deploying Gradle Apps#Grails-3

基本上你需要在gradle.build中添加一些任务并创建一个 Procfile