- 更新歷史
- 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