ERROR: While executing gem … (Errno::EPERM)
Operation not permitted – /usr/bin/xcodeproj
Can not perform pod install under el capitan (15A279b)
被采纳的答案为：sudo gem install -n /usr/local/bin cocoapods
As it has been pointed out below, this is a cleaner way of doing it, instead of getting around the Security features of OS X.
sudo gem install -n /usr/local/bin cocoapods