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