Xcode7.3 安装cocoapods 失败问题解决

<code class="hljs http has-numbering"><span class="hljs-attribute" style="color: rgb(163, 21, 21);"></span></code>
ERROR:  Error installing cocoapods:activesupport requires Ruby version >= 2.2.2.
说明Ruby环境需要升级更新, 我以mac OS 10.11.5 更新ruby方法为例, 更新Ruby环境安装cocoapods的详细步骤:
终端成功安装cocoapods详细步骤:

Last login: Thu Jul 14 08:57:44 on console
TuFa-Mac:~ TuFa$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
TuFa-Mac:~ TuFa$ gem sources --remove https://rubygems.org/
source https://rubygems.org/ not present in cache
TuFa-Mac:~ TuFa$ gem sources -a https://ruby.taobao.org/ 
source https://ruby.taobao.org/ already present in the cache
TuFa-Mac:~ TuFa$ gem sources -l
*** CURRENT SOURCES ***


https://ruby.taobao.org/
TuFa-Mac:~ TuFa$ sudo gem install cocoapods
Password:
ERROR:  Error installing cocoapods:
activesupport requires Ruby version >= 2.2.2.

TuFa-Mac:~ TuFa$ curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Couldn't connect to server
TuFa-Mac:~ TuFa$ ping
usage: ping [-AaDdfnoQqRrv] [-b boundif] [-c count] [-G sweepmaxsize]
            [-g sweepminsize] [-h sweepincrsize] [-i wait] [−k trafficclass]
            [-l preload] [-M mask | time] [-m ttl] [-p pattern]
            [-S src_addr] [-s packetsize] [-t timeout][-W waittime] [-z tos]
            host
       ping [-AaDdfLnoQqRrv] [-b boundif] [-c count] [-I iface] [-i wait]
            [−k trafficclass] [-l preload] [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]
            [-s packetsize] [-T ttl] [-t timeout] [-W waittime]
            [-z tos] mcast-group
TuFa-Mac:~ TuFa$ curl -L get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    148      0  0:00:01  0:00:01 --:--:--   148
100 22865  100 22865    0     0   2919      0  0:00:07  0:00:07 --:--:--  5645
Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc',
but no GPG software exists to validate it, skipping.


Upgrading the RVM installation in /Users/apple/.rvm/
    RVM PATH line found in /Users/apple/.mkshrc /Users/apple/.profile /Users/apple/.bashrc /Users/apple/.zshrc.
    RVM sourcing line found in /Users/apple/.profile /Users/apple/.bash_profile /Users/apple/.zlogin.
Upgrade of RVM in /Users/apple/.rvm/ is complete.


# tf1106285167,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.


In case of problems: https://rvm.io/help and https://twitter.com/rvm_io


Upgrade Notes:


  * No new notes to display.


TuFa-Mac:~ TuFa$ source ~/.bashrc
TuFa-Mac:~ TuFa$ source ~/.bash_profile
TuFa-Mac:~ TuFa$ source ~/.profile
TuFa-Mac:~ TuFa$ rvm -v
rvm 1.27.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
TuFa-Mac:~ TuFa$  ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
TuFa-Mac:~ TuFa$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p648]
[ruby-]2.1[.8]
[ruby-]2.2[.4]
[ruby-]2.3[.0]
[ruby-]2.2-head
ruby-head


# for forks use: rvm install ruby-head-<name> --url https://github.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值