Actually you can switch ruby versions with the following commands:
rvm install ruby_version
After the installation, we can list the available Ruby versions we have installed by typing:
rvm list
We can switch between the Ruby versions by typing:
rvm use ruby_version
We can use various Rails versions with each Ruby by creating gemsets and then installing Rails within those using the normal gem commands:
rvm gemset create gemset_name # create a gemset rvm ruby_version@gemset_name # specify Ruby version and our new gemset gem install rails -v rails_version # install specific Rails version