When I try to build my app on Heroku, it fails because the Ruby version I purportedly am using is not supported by Heroku. My app has no problem building/deploying locally. Here is full message log:
-----> Ruby app detected
-----> Compiling Ruby/Rails
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-18/ruby-2.3.8.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
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-18/ruby-2.3.8.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
!
! An error occurred while installing ruby-2.3.8
!
! This version of Ruby is not available on Heroku-18. The minimum supported version
! of Ruby on the Heroku-18 stack can found at:
!
! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
!
! Push rejected, failed to compile Ruby app.
! Push failed
However, in my Gemfile and Gemfile.lock, I am NOT using ruby-2.3.8. That is why I am very confused. I have links to my Gemfile gist and Gemfile.lock gist.
Things I have tried on Heroku:
Running bundle install
.
This. Did not resolve issue, my Gemfile, Gemfile.lock, and local Ruby is ALL 2.6.3.
Making sure Gemfile and Gemfile.lock are the most recent ones in my Github.
Running gem install bundler -v 1.17.3
but it gives me ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.5.0 directory
EDIT:
It appears after running heroku run ruby -v
, that my Ruby version is actually ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]