As it has been pointed out below by Ramesh Ramchandaran, 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
I'm assuming you're running OS X 10.11.
This is happening because Apple has enabled rootless on the new install.
If you type:
sudo nvram boot-args="rootless=0"; sudo reboot
in terminal.app
, your computer will reboot with it disabled.
Once that is done, type:
sudo gem install cocoapods -V
the -V
is for verbose and will spit out any errors if they happen.
As rootless does not affect /usr/local/bin, the following succeeds:
sudo gem install -n /usr/local/bin cocoapods
Any caveats?
Using home-brew or custom $GEM_HOME can help resolving the issue.
I did clean installation of ruby with brew:
brew install ruby
Now the gem
stuff seem to happen relative to my /usr/local/bin*
, which is exactly what I needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With