在 Mac 中安装 Ruby 需要先安装好 RVM
RVM 是一个便捷的多版本 Ruby 环境的管理和切换工具 官网:https://rvm.io/
在终端控制台输入命令行:
$ curl -sSL https://get.rvm.io | bash -s stable // 之后按回车键
截止到目前 最新的版本是 rvm 1.29.10
如下所示:
:~ Mac $ curl -sSL https://get.rvm.io | bash -s stable
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Installing RVM to /Users/admin/.rvm/
Adding rvm PATH line to /Users/admin/.profile /Users/admin/.mkshrc /Users/admin/.bashrc /Users/admin/.zshrc.
Adding rvm loading line to /Users/admin/.profile /Users/admin/.bash_profile /Users/admin/.zlogin.
Installation of RVM in /Users/admin/.rvm/