0

I am fairly new to programming and would like some assistance with a problem.
I am currently facing with Heroku. I'm trying to push my Ruby on Rails app to Heroku using Git push Heroku master, but I keep getting 2 errors stating:

An error occurred while installing ruby-2.3.0
! This version of Ruby is not available on Heroku-18.
error: failed to push some refs to 'https://git.heroku.com/nameless-atoll-25465.git'

I am on my master branch on Ruby on Rails while doing this, but it seems like nothing is changing to make the ends meet.
I also spent lots of time on here trying to sort it out, and nothing seems to work. I've tried updating Git to Heroku on the master branch but the Ruby terminal keeps outputting on branch master nothing to commit whenever I try to update it using the Git commands. Has anyone found a solution to this issue? I'm currently running Ruby 2.3.0.

Filnor
  • 1,290
  • 2
  • 23
  • 28
A.P.
  • 1
  • 3
  • 1
    Your version of ruby is probably not new enough to be compatible with Heroku. In your gemfile file indicate a newer version like ruby '2.5.1' – Clyde T Nov 26 '18 at 09:35
  • You can see a description of Heroku's supported Ruby versions here: https://devcenter.heroku.com/articles/ruby-support – thisischuck Nov 26 '18 at 13:23
  • I updated the version but still getting the same error when I push to Heroku. – A.P. Nov 26 '18 at 18:49
  • You can downgrade heroku stack to solve this issue. Solution can be found here https://stackoverflow.com/questions/53354444/how-can-i-solve-this-trouble-to-deploy-a-rails-app-to-heroku?answertab=active#tab-top – Dipak Gupta Mar 08 '19 at 09:17

1 Answers1

1

The heroku-18 stack only supports Ruby 2.4.5 and 2.5.3.
See https://devcenter.heroku.com/articles/ruby-support#supported-runtimes

You should upgrade Ruby in your app, or downgrade to the heroku-16 stack.
Obviously, upgrading is always better than downgrading.

Damien MATHIEU
  • 31,924
  • 13
  • 86
  • 94