美文网首页
Mac RVM 安装 2020-08-16

Mac RVM 安装 2020-08-16

作者: 蓝白自由 | 来源:发表于2020-08-19 00:05 被阅读0次

一 什么是 RVM

RVM 全称是 ruby version manager,它是一个命令行工具,允许您轻松地安装管理和使用多个 ruby 环境。
虽然 macOS 自带了一个ruby环境,但是那是系统自己使用的,所以权限很小,只有 system。而/Library目录是root权限,所以很多会提示无权限。

二:安装步骤

安装历史一
如果之前安装过 RVM 想要更新 则 $ rvm get stable  升级
Mac ~ % rvm get stable
Downloading https://get.rvm.io
No GPG software exists to validate rvm-installer, skipping.
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.github.com:443 
WARN: ...the preceeding error with code 35 occurred while fetching https://api.github.com/repos/rvm/rvm/tags
Downloading https://github.com/rvm/rvm/archive/1.29.9.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.9/1.29.9.tar.gz.asc',
but no GPG software exists to validate it, skipping.
Upgrading the RVM installation in /Users/mac/.rvm/
    RVM PATH line found in /Users/mac/.mkshrc /Users/mac/.profile /Users/mac/.bashrc /Users/mac/.zshrc.
    RVM sourcing line found in /Users/mac/.profile /Users/mac/.bash_profile /Users/mac/.zlogin.
Upgrade of RVM in /Users/mac/.rvm/ is complete.
  * It looks like some old stuff is laying around RVM, you can cleanup with: rvm cleanup all

Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.

👉  Donate: https://opencollective.com/rvm/donate

RVM reloaded!
mac@xiaoxinxindeMac ~ % rvm -v
rvm 1.29.9 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
mac@xiaoxinxindeMac ~ % 


安装历史二
如果之前安装过 RVM 想要更新 则 $ rvm get stable  升级

Mac ~ % rvm get stable
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /Users/mac/.rvm/archives/rvm-installer.asc
gpg: 签名建立于 三  7/24 05:59:45 2019 CST
gpg:               使用 RSA 密钥 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: 完好的签名,来自于 “Piotr Kuczynski <piotr.kuczynski@gmail.com>” [未知]
gpg: 警告:此密钥未被受信任签名认证!
gpg:       没有证据表明此签名属于其声称的所有者。
主密钥指纹: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
GPG verified '/Users/mac/.rvm/archives/rvm-installer'
Downloading https://github.com/rvm/rvm/archive/1.29.10.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.10/1.29.10.tar.gz.asc
gpg: 签名建立于 四  3/26 05:58:42 2020 CST
gpg:               使用 RSA 密钥 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: 完好的签名,来自于 “Piotr Kuczynski <piotr.kuczynski@gmail.com>” [未知]
gpg: 警告:此密钥未被受信任签名认证!
gpg:       没有证据表明此签名属于其声称的所有者。
主密钥指纹: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
GPG verified '/Users/mac/.rvm/archives/rvm-1.29.10.tgz'
Upgrading the RVM installation in /Users/mac/.rvm/
    RVM PATH line found in /Users/mac/.mkshrc /Users/mac/.profile /Users/mac/.bashrc /Users/mac/.zshrc.
    RVM sourcing line found in /Users/mac/.profile /Users/mac/.bash_profile /Users/mac/.zlogin.
Upgrade of RVM in /Users/mac/.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

RVM reloaded!

Mac ~ % rvm -v
rvm 1.29.10 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]


使用 HTTPDNS 获取 ip 后 编辑 iHost 文件
13.229.188.59 github.com
69.171.233.33 github.global.ssl.fastly.net
151.101.108.133 raw.githubusercontent.com
97.107.133.48 get.rvm.io


- 安装 Homebrew 
- 安装 gpg 
: $ brew install gnupg
 
- 安装 mpapis 公钥,    打开 https://rvm.io

gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: 从公钥服务器接收失败:No keyserver available 

如果显示从公钥服务器接收失败则尝试下面的
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Mac ~ %  gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
gpg: 密钥 3804BB82D39DC0E3:“Michal Papis (RVM signing) <mpapis@gmail.com>” 未改变
gpg: 处理的总数:1
gpg:              未改变:1

安装 RVM 
\curl -sSL https://get.rvm.io | bash -s stable

For installing RVM with default Ruby and Rails in one command, run:
\curl -sSL https://get.rvm.io | bash -s stable —rails


常用命令

  • 查看 rvm 版本:rvm -v // rvm 1.29.10
  • 查看现在使用 RVM 管理的 Ruby 版本:which rvm
  • 列出可供 RVM 使用的 Ruby 版本:rvm list
  • 列出可安装的版本:rvm list known

相关文章

  • cocoapods安装

    安装,以下操作均在mac终端输入命令。 检查Mac是否安装了rvm:rvm -v 安装rvm:curl -L ge...

  • CocoaPods安装、使用、更新

    1、检查Mac是否安装rvm 检查Mac是否安装了rvm(ruby version manager)。打开终端,r...

  • Mac RVM 安装 2020-08-16

    一 什么是 RVM RVM 全称是 ruby version manager,它是一个命令行工具,允许您轻松地安装...

  • Mac开发环境搭建

    基础环境 安装mac 开发工具 安装 Homebrew iOS开发环境(可选) rvm 安装(可选) 安装rvm ...

  • CocoaPods安装

    CocoaPods创建 step1:安装rvm 检查是否Mac是否安装rvm。终端输入:rvm -v,如果出现如下...

  • CocoaPods安装

    Mac 环境下安装Pod Pod安装需要ruby,ruby需要rvm可以终端中查看rvm 安装没有 如果没有安装则...

  • macOS Mojave 10.14.6 CocoaPods的安

    准备 首先要检查Mac是否安装了rvm。打开终端,输入指令 rvm -v 用rvm安装ruby环境 检查更新Rub...

  • MacOS 10.15安装cocoapods

    一.前面都是很常规的 1.检查Mac是否安装rvm,没有的就安装一下安装rvm 指定源 检查安装是否成功 用rvm...

  • CocoaPods安装

    每次重装mac后都要重新配置环境!!! 就是安装rvm,然后用rvm安装ruby,然后在安装cocoapods 安...

  • 如何安装 ruby

    系统:mac os 10.13.6 先安装 rvm命令为: $ curl -L https://get.rvm....

网友评论

      本文标题:Mac RVM 安装 2020-08-16

      本文链接:https://www.haomeiwen.com/subject/mpgzdktx.html