1.查看版本号,使用命令: pod --version
caoyuanyuandeMacBook-Pro:~ cyy$ pod --version
1.5.3
2.查看ruby源地址,目前淘宝的不能用了,而且域名.org也不支持了,需要使用 https://gems.ruby-china.com/替换
$ gem source -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
2.1.移除旧的源 命令: "gem sources --remove"
$ gem sources --remove https://ruby.taobao.org/
2.2.添加新的源 命令: "gem sources -a https://gems.ruby-china.com/"
$ gem sources -a https://gems.ruby-china.com/
2.3.查看当前ruby源地址是否更改成功
$ gem sources -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com/
3.更新cocoapods
输入命令和电脑开机密码 "sudo gem install cocoapods"