user8000626
user8000626

Reputation: 305

upgraded ruby and still shows an older version

I had installed ruby by

rvm upgrade 2.7.1

and yet, when I try to bundle install, I get

Your Ruby version is 2.3.1, but your Gemfile specified ~> 2.7.0

when issuing

which ruby

I get :

/Users/saraginsburg/.rvm/rubies/ruby-2.3.1/bin/ruby

any ideas on how to solve this will be highly appreciated.

thanks for looking into it.

Upvotes: 0

Views: 1222

Answers (2)

Yakov
Yakov

Reputation: 3201

You need to choose the correct version of Ruby for your project. Try to run rvm use 2.7.1 or create a file '.ruby-version' in your project root that contains the version number 2.7.1.

Upvotes: 2

tadman
tadman

Reputation: 211710

Upgrading installs the new version, but you may need to use it, as in:

rvm use --default 2.7.1

Where the --default flag pins it for future shells.

Also check for .ruby-version which may cause it to switch within that directory.

You can check which version is active and which are available with:

rvm list

Upvotes: 3

Related Questions