Hit a snag on Step 4.7 Your First Rails Application


#1

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!!


#2

Type ruby -v and see what the output is.


#3

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:
remote: ! Push failed
remote: Verifying deploy…
remote:
remote: ! Push rejected to cryptic-tundra-46689.
remote:
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


#4

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


#5

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


#6

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


#7

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.


#8

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

Run that command and let me know the output


#9

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


#10

What OS are you using?


#11

MacOS Mojave version 10.14.2


#12

Did you run rbenv init?

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


#13

yes!


#14

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


#15

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


#16

Load rbenv automatically by appending

the following to ~/.bash_profile:

eval “$(rbenv init -)”


#17

cat ~/.bash_profile

What does that output?


#18

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

Load rbenv automatically by appending

the following to ~/.bash_profile:


#19

Is that it? Nothing else?


#20

Yes that’s all that came up.