Hit a snag on Step 4.7 Your First Rails Application


Completed all steps as followed and received an error stating that the push rejected and failed because the version of Ruby is not available on Heroku-18. I have tried everything to fix this so I can be done with the project and I don’t know what else I can do, also tried upgrading!!


Type ruby -v and see what the output is.


this is what it came back with : ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]

This is what the error looks like before
remote: !
remote: ! An error occurred while installing ruby-2.3.7
remote: !
remote: ! This version of Ruby is not available on Heroku-18. The minimum supported version
remote: ! of Ruby on the Heroku-18 stack can found at:
remote: !
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote: ! Push failed
remote: Verifying deploy…
remote: ! Push rejected to cryptic-tundra-46689.
To https://git.heroku.com/cryptic-tundra-46689.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/cryptic-tundra-46689.git


Ruby 2.3.7 is an older version which means there has been an issue setting up the latest Ruby.

What’s the output of echo $PATH


echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin


There are no paths for rbenv. You should go back through the installation section and check you followed everything correctly.


I went back through the instructions to make sure that I didn’t miss anything and tried to git push heroku master again and came back with the same error. I also tried to install the latest version of Ruby so I’m still trying to figure out how to solve this issue.


curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

Run that command and let me know the output


Checking for rbenv' in PATH: /usr/local/bin/rbenv Checking for rbenv shims in PATH: not found The directory/Users/ez/.rbenv/shims’ must be present in PATH for rbenv to work.
Please run `rbenv init’ and follow the instructions.

Checking `rbenv install’ support: /usr/local/bin/rbenv-install (ruby-build 20181225)
Counting installed Ruby versions: 2 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK


What OS are you using?


MacOS Mojave version 10.14.2


Did you run rbenv init?

If so did you close and open a new terminal afterwards?




It hasn’t worked because there is no rbenv in your path


What’s the output of rbenv init if you run it again?


Load rbenv automatically by appending

the following to ~/.bash_profile:

eval “$(rbenv init -)”


cat ~/.bash_profile

What does that output?


export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"

Load rbenv automatically by appending

the following to ~/.bash_profile:


Is that it? Nothing else?


Yes that’s all that came up.