参考链接:https://blog.51cto.com/u_14184703/5672250
一、下载rvm
git clone https://github.com/rvm/rvm.git
~ % git clone https://github.com/rvm/rvm.git
Cloning into 'rvm'...
remote: Enumerating objects: 60601, done.
remote: Counting objects: 100% (916/916), done.
remote: Compressing objects: 100% (389/389), done.
remote: Total 60601 (delta 597), reused 751 (delta 480), pack-reused 59685
Receiving objects: 100% (60601/60601), 21.53 MiB | 735.00 KiB/s, done.
Resolving deltas: 100% (39218/39218), done.
二、安装rvm
打开 Users/用户名/rvm/bin
文件夹,双击rvm-installer
Last login: Tue Jul 18 11:29:43 on ttys003
/Users/xx/rvm/binscripts/rvm-installer ; exit;
~ % /Users/xx/rvm/binscripts/rvm-installer ; exit;
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /Users/xx/.rvm/
RVM PATH line found in /Users/xx/.mkshrc /Users/xx/.profile /Users/xx/.bashrc /Users/xx/.zshrc.
RVM sourcing line found in /Users/xx/.profile /Users/xx/.bash_profile /Users/xx/.zlogin.
Upgrade of RVM in /Users/xx/.rvm/ is complete.
Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.
👉 Donate: https://opencollective.com/rvm/donate
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[进程已完成]
三、启用rvm指令
source ~/.rvm/scripts/rvm
~ % source ~/.rvm/scripts/rvm
~ % rvm -v
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]