I've upgraded to El Capitan and since then I can't update my pods.
$ pod update
-bash: pod: command not found
$ sudo gem install cocoapods
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
This is caused by the new System integrity protection feature introduced in El Capitan. It restricts even administrators from writing to
Your best option would be to install gems without needing
sudo. There is a good guide on how to do that.
If you don't want to do that, you can install CocoaPods to
/usr/local/bin instead as shown in this answer with:
sudo gem install -n /usr/local/bin cocoapods