Heroku deploy "Invalid RUBY_VERSION specified", worked yesterday - ruby-on-rails

I was able to deploy to heroku yesterday just fine. We're on the cedar stack with a rails 3.2 application. When I deploy it gives me this:
$ git push -f heroku-ab-staging tmp-heroku-deploy-gochez_heroku_test-2012-05-08-10-43-39:master
Counting objects: 222, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (162/162), done.
Writing objects: 100% (191/191), 112.28 KiB, done.
Total 191 (delta 45), reused 13 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
!
! Invalid RUBY_VERSION specified: fatal:-Not-a-git-repository:-'.'-fatal:-Not-a-git-repository:-'.'-fatal:-Not-a-git-repository:-'.'-No-ruby-version-specified
! Valid versions: ruby-1.9.3-p0, ruby-1.9.3-p125, rbx-1.2.4, rbx-2.0.0dev-20120115-1.9, rbx-2.0.0dev-20120115-1.8, rbx-2.0.0dev-20120123-1.9, rbx-2.0.0dev-20120123-1.8, ruby-1.9.2-p290, jruby-1.6.5.1, jruby-1.6.7, ruby-1.9.3, ruby-1.9.2
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:myapp.git
! [remote rejected] tmp-heroku-deploy-gochez_heroku_test-2012-05-08-10-43-39 -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
(Note that I changed my real app's name to myapp for privacy concerns)
Any idea what might be causing this? It was working just fine yesterday. What debugging can I perform to figure out what the issue is?

We changed the undocumented API you were using and released official version ruby support: http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/ You'll now need to use Bundler 1.2.0 +. Let me know if you have questions.

Related

Heroku Push failing Ruby Rails App error while loading shared libraries, file too short

I was trying to push a new version of my rails app to my Heroku account which sits on a Heroku-16 stack but suddenly it began failing with the following error:
[master 195f4f9] ...
1 file changed, 6 insertions(+), 1 deletion(-)
Counting objects: 15, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (15/15), 1.66 KiB | 1.66 MiB/s, done.
Total 15 (delta 11), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/heroku-16/bin/ruby: error while loading shared libraries: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3cf92a0d05bedd42cfe/vendor/ruby/heroku-16/bin/../lib/libruby.so.2.2: file too short
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to myherokuapp.
remote:
To https://git.heroku.com/myherokuapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/myherokuapp.git'
I tried doing a bundle update, that did not solve anything. I also tried undoing recent changes to the code and that did not resolve the issue. Finally, I also checked Heroku status and there are no relevant incidents that they have reported. Any idea why this would be occurring?
I found the solution. I upgraded my ruby version in my gemfile to 2.3.7, one of the stated versions that Heroku says it supports and that seemed to resolve the issue.

No default language could be detected for this app

I push object to heroku. Run git push heroku master.
It said:
Counting objects: 124, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (113/113), done.
Writing objects: 100% (124/124), 23.86 KiB | 0 bytes/s, done.
Total 124 (delta 29), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fast-spire-62625.
remote:
I googled that, but I did not find the right way to fix it!
Each language/buildpack has a bin/detect file used to detect if it can be used for that app.
That error indicates no default buildpacks were detected here.
The ruby buildpack relies on the presence of a Gemfile file at the top of your directory.
This error means that file wasn't found. Is this really a ruby project? Is it at the top of your directory or in a subfolder?
You can change the buildpack used by an application by setting the buildpack value. When the application is next pushed, the new buildpack will be used.
heroku buildpacks:set heroku/ruby
Refer this

Can't push to Heroku Push rejected

I'm trying to push changes to my heroku app, but after a while it freezes and errors out. May be related with the fact that I was using puma for webserver but I had to remove because of incompatibility issues with plezi, the framework I'm using from websockets. My app in total is 4mb.
I get this error message:
remote: ! Timed out compiling Ruby app (15 minutes)
remote: ! See https://devcenter.heroku.com/articles/slug-compiler#time-limit
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to my-app-3605.
remote:
To https://git.heroku.com/my-app-3605.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-app-3605.git'
The setup I have with plezi, is that it creates a mini app within rails. It creates a folder, in my case appname\ that contains it's own Gemfile, Procfile and appname.rb
|
|-- app\
|-- appname\
|-- bin\
.
. and so on
.
As included in the response, the error is
Timed out compiling Ruby app (15 minutes)
remote: ! See https://devcenter.heroku.com/articles/slug-compiler#time-limit
You may want to check the referenced link and determine why it took more than 15 minutes to deploy the app.
To solve the issue, it was needed to add to Rakefile
require 'plezi/rake'
This will solve Plezi/Rails incompatibility when pushing to Heroku
http://www.plezi.io/docs/rake

Rails Heroku Gemfile.lock error - push rejected (open source)

I am trying to push my open source RoR application to Heroku but I'm having an issue making the initial push. I have read many similar questions, but none of those answers has helped to solve my problem. I have tried bundle update and bundle install various times. I also have tried removing and then re-committing my Gemfile.lock file, however I get this same error still...
$ git push heroku master
Counting objects: 5199, done.
Compressing objects: 100% (3086/3086), done.
Writing objects: 100% (5199/5199), 4.57 MiB | 131 KiB/s, done.
Total 5199 (delta 3418), reused 3152 (delta 1962)
-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/NoLockfile
!
! Gemfile.lock required. Please check it in.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:frozen-springs-4725.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:frozen-springs-4725.git'
Since my application uses MongoDB with MongoMapper, I suspect that I have some configuration incorrect. My code can be found here on Github (I'm currently working on the heroku branch). Feel free to clone our repository and try it yourself.
If anyone has any insight which could help me resolve this issue I would be very thankful!
Or better just run
git push heroku heroku:master
This will push your heroku branch to the master branch on heroku, which is the one heroku use's (Heroku ignores everything but the master branch).
Please read this article first.
Branches pushed to Heroku other than master will be ignored by this command. If you’re working out of another branch locally, you can either merge to master before pushing, or specify that you want to push your local branch to a remote master. To push a branch other than master, use this syntax:
$ git push heroku yourbranch:master

rails 3 heroku push master issue

when I push my rails 3 app git heroku master I get this error msg:
-----> Heroku receiving push
-----> Rails app detected
! Heroku Bamboo does not include any Rails gems by default.
! You'll need to declare it in either .gems or Gemfile.
! See http://docs.heroku.com/gems for details on specifying gems.
! Heroku push rejected, no Rails gem specified.
error: hooks/pre-receive exited with error code 1
To git#heroku.com:glowing-rain-62.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:glowing-rain-62.git'
I have gem 'rails', '3.0.3' specified in my gemfile, so I am not sure what the issue is....If anyone could help I would really appreciate it. Thanks..
Don't forget that Gemfile is case sensitive. Make sure the file is actually IN your repo. You should also have a Gemfile.lock file too. Which version of bundler are you running?
Have you successfully deployed to Heroku before?
If not you may want to double-check that rails, 3.0.3 is committed to your Git repo just as a sanity check...
I think the problem might be connected with the heroku server type (or idiomatically: stack). The normal stack (called Aspen, I think) is runned by Debian Etch which doesn't support newer versions of Rails (i.e. Rails 3) and neither Sinatra.
To solve the problem you can switch to the Bamboo stack which is runned by Debian Lenny. You can do it by switching the stack as followed:
heroku create yourname --stack bamboo-mri-1.9.2
"yourname" is of course the name of your application. After that it should work as it should.

Resources