If anyone is facing issue in updating pods on Mac El Capitan, then follow the below way to update CocoaPods
sudo nvram boot-args="rootless=0"
sudo reboot
After Restart Your Mac Open Terminal And Type
sudo gem install cocoapods -V
it was still showing the error, then further added
sudo gem install -n /usr/local/bin cocoapods
Link:installation - Cannot install cocoa pods after uninstalling