1.安裝rvm
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt update -y
sudo apt -y install rvm
2.设为开机自启动
echo "source /usr/share/rvm/scripts/rvm" | sudo tee -a /etc/profile
echo "source /usr/share/rvm/scripts/rvm" | sudo tee -a ~/.bashrc
source /usr/share/rvm/scripts/rvm
3.安装rvm
查看ruby 当前版本
rvm list known
选择版本安装
rvm install ruby-2.7.5