Error installing pods:activesupport requires Ruby version >= 2.2.2
小白链接篇:http://www.cnblogs.com/gongyuhonglou/p/5801681.html(注:rvm install 2.2.2 的时候需要 2次输入密码 并按ENTER)
(type new path if you wish custom Homebrew installation (the path needs to be writable for user)
: 密码
)
1.要安装ruby2.2,要先安装rvm。(呃,感觉到了深深的恶意,太没人性了)
$ curl -L https://get.rvm.io | bash -s stable
//这里现在是1.29.0版本了(2017年3月15日再次安装的时候)
$ source ~/.rvm/scripts/rvm
$ rvm -v
rvm 1.27.0(latest) by WayneE.Seguin,MichalPapis [https://rvm.io/]
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/](2017年3月15日再次安装的时候)
2.安装ruby
rvm list known
//查看rvm版本
rvm install2.2.2
3.安装cocoapods
$gem sources --remove https://rubygems.org/
$gem sources -a https://ruby.taobao.org/
4.验证新源是否替换成功
$gem sources-l
$sudo gem install cocoapods
5.设置cocoapods
文/TheAlchemist(简书作者)
新版链接:http://www.cocoachina.com/ios/20160922/17622.html
用 rvm 更新 ruby 参考:
http://blog.csdn.net/lissdy/article/details/9191351
http://www.cnblogs.com/yan520/p/5583362.html
6.pod install错误
//is not used in any concrete target
修改你的 pod file 格式为:
podfile格式:
platform :ios, '8.0'
target '你的项目名称' do
pod 'AFNetworking', '~> 3.1.0'
end