Heroku Grails buildpack: "Incompatible minimum and maximum heap sizes specified" - grails

I'm getting an "Incompatible minimum and maximum heap sizes specified" compiler error trying to push a Grails application to Heroku. I don't know of a way to enable more verbose logging during compilation but I'd be happy to provide more info.
506 ita-signup $ git push heroku master
Counting objects: 31, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (21/21), 2.74 KiB, done.
Total 21 (delta 11), reused 0 (delta 0)
-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Grails app detected
-----> Grails 2.0.4 app detected
WARNING: The Grails buildpack is currently in Beta.
-----> Executing grails -Divy.default.ivy.user.dir=/app/tmp/repo.git/.cache compile --non-interactive
Error occurred during initialization of VM
Incompatible minimum and maximum heap sizes specified
! Failed to build app
! Heroku push rejected, failed to compile Grails app
To git#heroku.com:XXX-3359.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:XXX-3359.git'

Answer: I had set the user-env-compile feature. Using this to force valid heap settings worked:
$ heroku config:set JAVA_OPTS='-Xms384m -Xmx384m -Xss512k -XX:+UseCompressedOops'
$ git push heroku master
...
(success)

Related

Heroku Ruby Buildpack Detection Failure

I'm attempting to deploy my Ruby on Rails application that is currently on branch "rails_app" (as shown below). I have successfully deployed it before, but it is now not working with additional changes. When I manually look for buildpacks by running "heroku buildpacks," it indicates the correct one is there. [When I try to reinstall the buildpack, it also says it is already there] When I attempt to push to heroku I receive the failure to detect set buildpath as shown below.
Dougs-MBP-2:Rails_Application Doug$ heroku buildpacks
app_name Buildpack URL
heroku/ruby
Dougs-MBP-2:Rails_Application Doug$ git branch
gh-pages
master
* rails_app
update
Dougs-MBP-2:Rails_Application Doug$ git push heroku rails_app:master
Counting objects: 70, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (70/70), 217.85 KiB | 0 bytes/s, done.
Total 70 (delta 46), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to app_name.
remote:
To https://git.heroku.com/app_name.git
! [remote rejected] rails_app -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app_name.git'
Thanks for your help.
It seems you are setting a custom buildpack: "https://codonbuildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz" but when I visit that link it says that no bucket with that name exists which means that heroku can't detect your custom buildpack and fails.
You can read more about how to specify custom buildpacks here: https://devcenter.heroku.com/articles/buildpacks#detection-failure
The ruby buildpack that heroku uses is on this page:
https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-ruby

Rails 5 Heroku - failed to detect set buildpack

I have a Rails 5 app that I'm trying to push to Heroku. The Heroku instance exists, git remotes are set up, etc. However I'm getting an error that it can't detect the buildpack, although it is defined. Any ideas?
$ heroku buildpacks
=== xx Buildpack URL
heroku/ruby
$ heroku buildpacks:set heroku/ruby
▸ The buildpack heroku/ruby is already set on your app.
$ git push heroku master
Counting objects: 1208, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1075/1075), done.
Writing objects: 100% (1208/1208), 25.04 MiB | 1.63 MiB/s, done.
Total 1208 (delta 634), reused 217 (delta 49)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to xx.
...
If the configured buildpack cannot handle your application (as determined by its detection script), you will receive an error. For example, Heroku’s Ruby buildpack expects a Gemfile to be present in the root folder of an application to correctly identify its type, but if the buildpack of an application is set to heroku/ruby and no Gemfile is present, the application will fail to build. Try check if your Gemfile is present in the root folder of your project.

Failed to deploy redmine to HEROKU due to Gemfile.lock nonexistence

I had this particular error upon pushing/deploying to Heroku
Counting objects: 92259, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (19977/19977), done.
Writing objects: 48% (45054/92259), 13.63 MiB | 103 KiB/s
Writing objects: 100% (92259/92259), 23.82 MiB | 87 KiB/s, done.
Total 92259 (delta 72165), reused 90569 (delta 70774)
-----> Ruby/NoLockfile app detected
!
! Gemfile.lock required. Please check it in.
!
! Push rejected, failed to compile Ruby/NoLockfile app
To git#heroku.com:xiruki-task.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:xiruki-task.git'
I've tried to remove the Gemfile.lock and bundle install again but no luck.
Any workarounds will be appreciated.
run bundle install and that will generate your gemfile.lock. Then commit it and deploy to heroku

Rails app not recognized by Heroku

I can't push to Heroku and unfortunately none of the other questions on StackOverflow help.
I'm using Rails 3.0.9 and Heroku doesn't recognize my app as a Rails app.
$ git push heroku master
Counting objects: 378, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (311/311), done.
Writing objects: 100% (378/378), 134.64 KiB, done.
Total 378 (delta 143), reused 107 (delta 12)
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:cold-xyz.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:cold-xyz.git'
The repository's layout was wrong.
My rails app was in a subdirectory of the repository. I set Rails' root directory to the repositories root directory and that fixed it:
git mv subdirectory/* .
Try updating your bundle, and then pushing it again.
Or may have something to do with gemlock file?
Else if all fails, you can remove the .git file and re init again.

Why is Heroku rejecting this git push?

I make a new Heroku app inside of my current app directory using Heroku create and ran this:
MyMac:bodb pawel$ git push heroku master
Counting objects: 359, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (291/291), done.
Writing objects: 100% (359/359), 13.83 MiB | 2 KiB/s, done.
Total 359 (delta 40), reused 0 (delta 0)
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git#heroku.com:myproject.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myproject.git'
My rails app runs on Ruby 1.8.7 but even a Heroku app on --stack bamboo-ree-1.8.7 fails.
I have also run bundle install and my Gemfile is up to date.
I don't know why the commit was corrupted, but contacted Heroku and they sorted it out.
I had that error once when I changed the Gemfile but did not run bundler and therefore modified Gemfile.lock

Resources