Reputation: 71
I just upgraded an old app from Heroky running ruby on rails. I upgraded both ruby 1.9.3 to 2.5.1 and rails 3.2 to 5.2.0.
Then I created a new app on Heroku and try to deploy, but I keep getting an error message saying Heroku cannot install 1.9.3.
Here is the error log:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-1.9.3-p551.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-1.9.3-p551.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote: !
remote: ! An error occurred while installing ruby-1.9.3-p551
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! For more information on syntax for declaring a Ruby version see:
remote: ! https://devcenter.heroku.com/articles/ruby-versions
remote: !
remote: !
remote: ! Debug InformationCommand: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-16/ruby-1.9.3-p551.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote: !
remote: ! gzip: stdin: unexpected end of file
remote: ! tar: Child returned status 1
remote: ! tar: Error is not recoverable: exiting now
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to nbmen-staging.
remote:
To https://git.heroku.com/nbmen-staging.git
! [remote rejected] master -> master (pre-receive hook declined)
In my Gemfile, I have:
source 'https://rubygems.org'
ruby '2.5.1'
gem 'rails', '5.2.0'
In Gemfile.lock, I have: RUBY VERSION ruby 2.5.1p57
BUNDLED WITH
1.16.1
There is also a .rbenv-version file and I changed the content from 1.9.3 to 2.5.1.
And I still gets the "An error occurred while installing ruby-1.9.3-p551" message. What am I missing?
Upvotes: 0
Views: 326
Reputation: 1001
The Ruby version file is now called .ruby-version
.
The file that you have is called .rbenv-version
. It's an old name and it's not supported anymore.
You can try renaming it.
Upvotes: 0
Reputation: 640
seems like you may have an old/unrealeased heroku buildpack, as the bundler version is not being output in your build (and consequently you may be using an old bulder version).
What I would have expected to see is:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.5.1
-----> Installing dependencies using bundler 1.15.2
...
To check your buildpack:
$ heroku buildpacks
=> heroku/ruby
If it doesn't output heroku/ruby
, then you are running an old/unreleased buildpack
To install the latest buildpack:
heroku buildpacks:set heroku/ruby
For more information: https://devcenter.heroku.com/articles/bundler-version
Upvotes: 1