0

I just updated ruby, and running ruby -v in terminal shows: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]

However, when trying to run rails console, I get the error:

Rails 6 requires Ruby 2.5.0 or newer.

You're running
  ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]

Please upgrade to Ruby 2.5.0 or newer to continue.

Which is the version I just (allegedly) updated from. Any help is greatly appreciated.

2 Answers2

1

Because in your local development, you had some ruby versions which was installed, and it set ruby 2.3.7 as default.

If you installed ruby via rvm, you can check and list all ruby versions in your local via command:

rvm list

For examples:

   ruby-2.6.0 [ x86_64 ]
=* ruby-2.6.2 [ x86_64 ]
   ruby-2.6.3 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

As you see, you can use this command as bellow to set default ruby to use.

rvm use 2.6.3 --default

Khanh Pham
  • 2,848
  • 2
  • 28
  • 36
  • rvm list showed `# Default ruby not set. Try 'rvm alias create default '.` I tried your suggestion, and got some errors: `Warning! Executable 'ruby' missing, something went wrong with this ruby installation!` `Warning! Executable 'gem' missing, something went wrong with this ruby installation! `Warning! Executable 'irb' missing, something went wrong with this ruby installation!` – Brian Nicholls Nov 21 '19 at 04:10
0

I had to run rvm implode , then re-install rvm. Then I followed the instructions found here: How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

Thank you!