0

I used RVM to install Ruby 2.5.1, and set that to the default. However when I open a new terminal window, and type which ruby I get the path to my machine's Ruby not the one I set.

For example, when I set the default and run which ruby:

=> /home/COM-COM/.rvm/rubies/ruby-2.5.1/bin/ruby

When I open a new terminal window and run which ruby:

=> /usr/bin/ruby

I thought when I ran rvm --default use 2.5.1 RVM would remember the set default until I changed it.

Does anyone know what's going on here, and does anyone have a solution?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Practical1
  • 789
  • 1
  • 8
  • 26
  • Possible duplicate of [Why doesn't "RVM --default" work for me on MacOSX?](https://stackoverflow.com/questions/5604877/why-doesnt-rvm-default-work-for-me-on-macosx) – anothermh Oct 13 '18 at 01:07
  • What about `rvm --default 2.5.1`? – tadman Oct 13 '18 at 01:07
  • @tadman The command `rvm --default use 2.5.1` is supposed to set that version of ruby to be the system's default. – Practical1 Oct 13 '18 at 01:28

1 Answers1

0

If you want to install a specific version of Ruby (2.5.1), you can use this:

rvm install ruby-2.5.1
rvm --default use ruby-2.5.1

If you wanted to install and use the latest version of Ruby, you can use the following:

rvm install ruby
rvm --default use ruby
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Jake
  • 1,086
  • 12
  • 38