Manage multiple Ruby versions by uru and RVM

Tzung-Chien Hsieh
3 min readApr 18, 2022

This article will introduce how to manage multiple ruby versions on the same computer. Here I use uru for windows and RVM for Ubuntu as examples.

uru and RVM

How to use uru

  1. Download from https://bitbucket.org/jonforums/uru/src/master/
  2. Unzip and add it to the PATH environment variable.
  3. Install uru by the following command.
uru_rt admin install

Now you can add the ruby version to it. For example, here I added C:\Ruby31-x64\bin\ to uru and named it ruby3.

uru admin add C:\Ruby31-x64\bin\ ruby3

We can list all the environments by the following command.

uru ls

To select the version, you could use the following command.

uru ruby3

Encounter error when using uru in windows?

Please check this article https://la60312.medium.com/uru-error-in-windows-10-bc7470c688fe, if you encounter the error in windows.

How to use RVM

Using RVM is relatively easier than uru.

Install RVM by the following command.

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

If you encounter the error, please follow the suggestion in the error message.

In my case, I can install it successfully by the second command.

curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -

Then install RVM.

curl -sSL https://get.rvm.io | bash -s stable --rails

Install Ruby version 3.1.1

rvm install 3.1.1

Select the ruby version xxx

rvm use xxx

Summary

Now, you should be able to use uru and RVM in both Windows and Linux systems to manage your ruby versions.

--

--

Tzung-Chien Hsieh

Computer science PhD student, I will share what I learned in Programming, Machine Learning, and Rare Disorders.