cocoapods:安装以及更新Ruby环境教程

今天换了一台新的mac 在使用的时候发现cocoapods不可以使用

安装cocoapods的时候提示这个错误

<code class="hljs http has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-attribute" style="box-sizing: border-box;">ERROR</span>: <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;"> Error installing cocoapods: activesupport requires Ruby version >= 2.2.2.</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

查看本机的版本


通过rvm安装ruby

1、安装 ram 

想知道rvm是什么可以

RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems

1、安装指令

$ curl -L get.rvm.io | bash -s stable


2、检查 rvm 版本

rvm -v

查看ruby 版本

ruby -v $ rvm list known

安装

rvm install 2.3

检查安装ruby 版本



安装cocoapod

sudo gem install cocoapods

安装成功

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值