CocosPods版本升级

最近发现本机的CocoaPods版本较老,就动手升级了,升级CocoaPods的步骤和安装的时候差不多,具体参考如下步骤:

1.查看下当前的版本号,命令如下:

pod --version // 本机版本1.2.1

2.升级前查看当前安装的Ruby源地址:

gbogon:~ mars$ gem source -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/

3.由于目前淘宝的源不能用了,故移除淘宝的Ruby源,添加一个新的源

// 移除旧的源 命令: "gem sources --remove"

  • bogon:~ mars$ gem sources --remove https://ruby.taobao.org/
  • https://ruby.taobao.org/ removed from sources

// 添加新的源 命令: "gem sources -a https://gems.ruby-china.org/"

bogon:~ mars$ gem source -a https://gems.ruby-china.org/
https://gems.ruby-china.org/ added to sources

4.查看新源是否安装成功

bogon:~ mars$ gem source -l

*** CURRENT SOURCES ***

https://gems.ruby-china.org/

5.开始安装,输入如下命令:

bogon:~ mars$ sudo gem install cocoapods

Password: //输入本机密码

Fetching: cocoapods-core-1.3.1.gem (100%)
Successfully installed cocoapods-core-1.3.1
Fetching: claide-1.0.2.gem (100%)
Successfully installed claide-1.0.2
Fetching: netrc-0.11.0.gem (100%)
Successfully installed netrc-0.11.0
Fetching: cocoapods-trunk-1.3.0.gem (100%)
Successfully installed cocoapods-trunk-1.3.0
Fetching: molinillo-0.5.7.gem (100%)
Successfully installed molinillo-0.5.7
Fetching: colored2-3.1.2.gem (100%)
Successfully installed colored2-3.1.2
Fetching: xcodeproj-1.5.3.gem (100%)
Successfully installed xcodeproj-1.5.3
Fetching: ruby-macho-1.1.0.gem (100%)
Successfully installed ruby-macho-1.1.0
Fetching: cocoapods-1.3.1.gem (100%)
Successfully installed cocoapods-1.3.1
Parsing documentation for cocoapods-core-1.3.1
Installing ri documentation for cocoapods-core-1.3.1
Parsing documentation for claide-1.0.2
Installing ri documentation for claide-1.0.2
Parsing documentation for netrc-0.11.0
Installing ri documentation for netrc-0.11.0
Parsing documentation for cocoapods-trunk-1.3.0
Installing ri documentation for cocoapods-trunk-1.3.0
Parsing documentation for molinillo-0.5.7
Installing ri documentation for molinillo-0.5.7
Parsing documentation for colored2-3.1.2
Installing ri documentation for colored2-3.1.2
Parsing documentation for xcodeproj-1.5.3
Installing ri documentation for xcodeproj-1.5.3
Parsing documentation for ruby-macho-1.1.0
Installing ri documentation for ruby-macho-1.1.0
Parsing documentation for cocoapods-1.3.1
Installing ri documentation for cocoapods-1.3.1
Done installing documentation for cocoapods-core, claide, netrc, cocoapods-trunk, molinillo, colored2, xcodeproj, ruby-macho, cocoapods after 8 seconds
9 gems installed //成功

6.再次查看CocoaPods的版本,升级成功!

bogon:~ mars$ pod --version
1.3.1

升级顺利 ,没有出现问题 ,故未列出任何升级异常状况。

你可能感兴趣的:(CocosPods版本升级)