install ruby version rvm code example
Example 1: rvm install new ruby version
$ ruby -v # Check ruby version
$ rvm install ruby-X.X.X # Install specific ruby version
$ rvm list # List ruby versions
$ rvm use ruby-X.X.X # Choose a version to use
$ rvm use ruby-X.X.X --default # Set a version as default
Example 2: Installing ruby version manager (rvm)
$ \curl https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable