0、什么是CocoaPods以及为什么要用CocoaPods之类的在这里不再阐述;
1、升级Ruby环境
| 1 | 终端输入:$ sudo gem update --system | 
直到看到最后一行提示RubyGems system software updated,说明Ruby升级成功;
2、更换Ruby镜像
首先移除现有的Ruby镜像
| 1 | 终端输入:$ gem sources --remove https://rubygems.org/ | 
然后添加国内最新镜像源(淘宝的Ruby镜像已经不更新了)
| 1 | 终端输入:$ gem source -a https://gems.ruby-china.org/ | 
执行完毕之后输入gem sources -l来查看当前镜像
| 1 | 终端输入:$ gem sources -l | 
如果结果是
| 1 2 | *** CURRENT SOURCES *** https://gems.ruby-china.org/ | 
说明添加成功[……]

 
 

