- 更新历史
- 2018.11.23 镜像源改为https://gems.ruby-china.com/
查看镜像源
- 终端输入
gem source -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
提示为淘宝镜像源,升级可能会失败,貌似不能用了
sudo gem install cocoapods
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
hostname "upyun.gems.ruby-china.org" does not match the server certificate
更换镜像源
- 移除淘宝镜像源
gem sources --remove https://ruby.taobao.org/
- 添加新的镜像源
//gem sources -a https://gems.ruby-china.org/ 目前貌似不能用了
gem sources -a https://gems.ruby-china.com/
更新gem
sudo gem update --system
更新cocoapods
sudo gem install cocoapods 或者 sudo gem install -n /usr/local/bin cocoapods --pre
sudo gem install -n /usr/local/bin cocoapods --pre //加上--pre是表示可以升级到最新的beta版本,不加则是稳定版
升级成功,查看版本
pod --version
1.5.3