1.开启 terminal
2.更换现在的Ruby源
gem sources -l 查看当前Ruby源,如果是https://rubygems.org/,则运行gem sources --remove https://rubygems.org/,使用新的源gem sources -a https://ruby.taobao.org/,再次运行gem sources -l是否更新成功。
3.安装Cocoapods
sudo gem install cocoapods
pod setup.
gem sources -l 查看当前Ruby源,如果是https://rubygems.org/,则运行gem sources --remove https://rubygems.org/,使用新的源gem sources -a https://ruby.taobao.org/,再次运行gem sources -l是否更新成功。
sudo gem install cocoapods
pod setup.