升级步骤如下:
//移除Ruby
gem sources --remove https://rubygems.org/
//使用淘宝镜像
gem sources -a https://ruby.taobao.org/
//验证sources
gem sources -l
//成功提醒
*** CURRENT SOURCES ***
https://ruby.taobao.org/
//检查ruby 版本
ruby -v
//我的是(升级前版本过低)
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
//看看list
rvm list known
-bash: rvm: command not found
//如果没装rvm,装个
curl -L get.rvm.io | bash -s stable
//查看ruby版本号
rvm list known
//安装2.2.2版本即可
rvm install 2.2.2
//本机安装到一半,网络问题中断,reinstall即可
rvm reinstall 2.2.2
//如果未装Homebrew,按照提示进行安装
...
//安装cocoapods
sudo gem install cocoapods
//更新gem
sudo gem update --system
//pod 配置时卡了很久
pod setup
//以上步骤成功就可以用了,验证一下
pod --version
输出:1.1.0.beta.2
//本机卡了很久,需要移除之前的master
pod repo remove master
//从git上更新master,耗时比较长
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
//再次设置pod
pod setup
//成功!!
开始项目适配吧
更新成功
网友评论