Depending on some aspects this might work for you, if you don't mind using the "SUDO" command:
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
Latest CocoaPods 1.10.0 won't work.
Topic:
App & System Services
SubTopic:
Core OS
Tags: