Manage multiple Ruby versions by uru and RVM
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
- uru is the tool that could manage multiple ruby versions (https://bitbucket.org/jonforums/uru/src/master/). We can use it in Windows.
- RVM is the tool that most people use on their Linux system. (https://rvm.io/rvm/install)
How to use uru
- Download from https://bitbucket.org/jonforums/uru/src/master/
- Unzip and add it to the PATH environment variable.
- 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.