Mac M1 , showing wrong ruby version when running bundle install

1k Views Asked by At

ruby -v

---- ruby 2.0.0p598 (2014-11-13 revision 48408) [x86_64-darwin21.2.0]

rvm list

--- =* ruby-2.0.0-p598 [ x86_64 ]

bundle install

----- Your Ruby version is 2.6.8, but your Gemfile specified 2.0.0

i have ruby 2.0.0 in gemfile and i have set same ruby version in local(please check above command) don't know why its giving error in bundle install os is mac version 12

1

There are 1 best solutions below

0
damuz91 On

Check your Gemfile, it may be stating to use ruby 2.0.0. Your options are:

  1. Remove that line from your Gemfile and bundle install again.
  2. Downgrade your ruby to 2.0.0
  3. Update your ruby in the Gemfile to 2.6.8 and bundle install again.

Alternatively check if your project's root contains a .ruby-version file which also may state the version of your project's ruby. If so, steps before are the same.

I recommend you installing some ruby version manager (Like RVM)