查看下cocoapods当前的版本号命令如下
jipengdeMacBook-Pro:~ jipeng$ pod --version
1.5.0
jipengdeMacBook-Pro:~ jipeng$
升级安装cocoapods
jipengdeMacBook-Pro:~ jipeng$ sudo gem install cocoapods
总结下来,要想成功升级cocoapods需要一个正确的操作流程和命令语句。
1、更新gem:sudo gem update --system
2、删除gem源:gem sources --remove https://ruby.taobao.org/
3、修改gem源:gem sources -a https://gems.ruby-china.org
4、查看gem源是否是最新的:gem sources -l
5、升级cocoapods:sudo gem install -n /usr/local/bin cocoapods --pre
6、查看升级后的cocoapods版本:pod --version