A. N. Other
A. N. Other

Reputation: 489

How can I use the latest version of Ruby by default?

I am on a Mac running OSX 10.11 El Capitan. I installed Ruby 2.3.1 via rvm. If I type in the terminal

ruby --version

It says that I am running 2.0.0

But if I type

rvm use 2.3.1

And then

ruby --version

It says that I am running 2.3.1

But next time I open terminal it goes back to 2.0.0

How can I use latest version of Ruby by default?

Upvotes: 0

Views: 384

Answers (2)

Ruslan
Ruslan

Reputation: 86

Make a .ruby-version file in a directory of your project and in it put ruby-3.2.1 or which ever version you want

Upvotes: 0

mlovic
mlovic

Reputation: 864

rvm --default use 2.3.1

Documentation here.

Upvotes: 1

Related Questions