I have Ruby 2.0 installed, but Rails does not recognize it and tells me to upgrade to 1.9.3.
When I run:
rails console
I get:
Rails 4 prefers to run on Ruby 2.0. You're running ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] Please upgrade to Ruby 1.9.3 or newer to continue.
This happens with all Rails commands. rails new , rails s , etc., however I definitely installed Ruby 2.0:
ruby -v ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
This is also not a problem with the wrong version of Ruby by default:
rvm list rvm rubies ruby-1.9.3-p429 [ x86_64 ] =* ruby-2.0.0-p195 [ x86_64 ] # => - current # =* - current && default # * - default
I read somewhere that this could be a problem with my PATH variable:
printenv PATH /Users/Aoeu/.rvm/gems/ruby-2.0.0-p195/bin:/Users/Aoeu/.rvm/gems/ruby-2.0.0- p195@global /bin:/Users/Aoeu/.rvm/rubies/ruby-2.0.0-p195/bin:/Users/Aoeu/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin
My Ruby seems to be installed in the right place:
which ruby /Users/Aoeu/.rvm/rubies/ruby-2.0.0-p195/bin/ruby
Can anyone help?
source share