For those with a sudo-less CocoaPods installation (i.e., you do not want to grant RubyGems admin privileges), you don't need the sudo
command to update your CocoaPods installation:
gem install cocoapods
You can find out where the CocoaPods gem is installed with:
gem which cocoapods
If this is within your home directory, you should definitely run gem install cocoapods
without using sudo
.
Finally, to check which CocoaPods you are currently running type:
pod --version