1 gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
2.sudo gem install cocoapods
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
mac os10.11 - usr/bin 是readonly ,更换安装位置
3.sudo gem install cocoapods -n/usr/local/bin
安装成功