注意:https://gems.ruby-china.org/ 因?yàn)橛蛎麄浒竼?wèn)題已不能訪問(wèn)惶室。 使用https://gems.ruby-china.com替換即可
1.先切換gem源
gem sources --remove https://rubygems.org/
gem source -a https://gems.ruby-china.com
2.查看是否切換成功
gem source -l
3.查看是否成功
*** CURRENT SOURCES *** https://gems.ruby-china.com
4.切換成功后恭取,接下來(lái)就可以開(kāi)始升級(jí)了cocoapods了
sudo gem install -n /usr/local/bin cocoapods --pre
5.查看是否升級(jí)成功
pod --version
6.升級(jí)成功后的版本號(hào)
1.6.0.beta.2
7.設(shè)置pod倉(cāng)庫(kù)
pod setup
8.setup成功
Setup completed