1. Installation RVM
Curl-l Https://get.rvm.io | Bash-s Stable
RVM is a command-line tool that provides management and switching of multiple versions of the Ruby environment, as well as different gemset depending on project management.
If the SSH key is not generated, this step may fail, and the installation can be performed directly after Ssh-keygen the key generation.
You may also encounter GPG-related issues: Follow the prompts:
GPG2--keyserver hkp://keys.gnupg.net--recv-keys 409b6b1796c275462a1703113804bb82d39dc0e3
。 If it fails, execute: Command Curl-ssl HTTPS://RVM.IO/MPAPIS.ASC | GPG2--import-. Then install the RVM once more, and follow the installation prompts for some action. Then rvm-v can see the RVM installed.
If it is not installed, you can try to connect to the VPN and then install it.
2, use RVM to install the Ruby version you need
Here I have the Ruby 2.1.1 version installed.