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?