Mac10.13.6,cocoapods的http://gems.ruby-china.org/需要替換爲https://gems.ruby-china.com/

1.先查看下ruby,看是不是https://gems.ruby-china.com/
gem sources -l
 

2.如果顯示http://gems.ruby-china.org/或者https://gems.ruby-china.org/,則爲舊源,需要添加新源刪除舊源。
gem sources --add https://gems.ruby-china.com/  --remove http://gems.ruby-china.org/
gem sources --add https://gems.ruby-china.com/  --remove https://gems.ruby-china.org/
如果顯示https://gems.ruby-china.com/,則不需要替換。

3.再次查看ruby,查看是否替換成成功


4.成功後,重新初始化安裝Pod。
sudo gem install -n /usr/local/bin cocoapods


5.查看安裝後的版本,現在最新版是1.7.1
pod --version

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章