cocoapods 终极方案
最近各种错误, 全部刷新 再说
sudo gem install -n /usr/local/bin cocoapods
$ sudo gem update --system // 先更新gem $ gem sources --remove https://rubygems.org/ $ gem sources -a https://gems.ruby-china.org/ $ gem sources -l //查看ruby地址 $ sudo gem install cocoapods // 安装cocoapods $ pod setup
如果
sudo gem install cocoapods
提示这个
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod
sudo gem install -n /usr/local/bin cocoapods
// 还出错的话, 就安装Homebrew 来安装ruby, 中间也是坑, 查.
brew install ruby
http://stackoverflow.com/questions/33015875/operation-not-permitted-usr-bin-update-rubygems