2018年 集成cocoapods

一、安装 CocoaPods

1、查看当前ruby源

gem sources -l

2、移除(所有)ruby源

gem sources --remove https://rubygems.org/

3、添加新的ruby源

gem sources -a http://gems.ruby-china.org/

4、安装cocoapods

sudo gem install cocoapods

出现如下错误:

ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj

将命令行换成如下

sudo gem install -n /usr/local/bin cocoapods

你可能感兴趣的:(2018年 集成cocoapods)