I forked and cloned a repo so I could deploy to Heroku - then I got the message below asking to upgrade the project Ruby version.
! The Ruby version you are trying to install does not exist on this stack.
!
! You are trying to install ruby-2.7.4 on heroku-22.
!
! Ruby ruby-2.7.4 is present on the following stacks:
!
! - heroku-18
! - heroku-20
!
! Heroku recommends you use the latest supported Ruby version listed here:
! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
!
! For more information on syntax for declaring a Ruby version see:
! https://devcenter.heroku.com/articles/ruby-versions
!
! Push rejected, failed to compile Ruby app.
! Push failed
In my Mac when I run ruby -v I get 3.1.2 version. When I go into the project's Gemfile and type the old version to the latest, I run bundle install but I get this message:
rbenv: version `2.7.4' is not installed (set by /Users/luciamoral/code/Luciamoral/Driven-App/.ruby-version)
Does this mean I need to also install the oldest version so it works? Also, I found that it is not recording changes when I push to origin master, despite having forked and cloned it to my machine. Any ideas please? Thanks!
bundlesay something likeYour Ruby version is 3.1.2, but your Gemfile specified 2.7.4?