Search code examples
ioscocoapodsosx-elcapitan

Cocoa Pods not updating pods on El Capitan


I've upgraded to El Capitan and since then I can't update my pods.

$ pod update
-bash: pod: command not found

So I've tried to reinstall CocoaPods and got this:

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

I am the administrator on this computer. Why is this happening?


Solution

  • This is caused by the new System integrity protection feature introduced in El Capitan. It restricts even administrators from writing to /usr/bin.

    Your best option would be to install gems without needing sudo. There is a good guide on how to do that:

    export GEM_HOME=$HOME/.gem
    export PATH=$GEM_HOME/bin:$PATH
    
    gem install cocoapods