When I execute on osx El Capitan:
sudo gem update --system
I got the error:
Updating rubygems-update
ERROR: While execut
I do have this problem when I try to uninstall and reinstall cocoapods. After searching, I found the solution is temporary disable the System Integrity Protection then Re-enable System Integrity Protection when works done.
Here are the steps.
1) Reboot your MAC and hold down Command+R until you see the Recovery Mode screen boot up.
2) In this Recovery Mode, look at the top file menu 'Utility' and select Terminal to open the Terminal
3) Enter this command below
csrutil disable / reboot
Your Mac will reboot now, once it reboot to normal screen, you can check to ensure you have disabled the System Integrity Protection by open the Terminal again and enter the following code
csrutil status
Now you can carry out the task you want to carry out.
4) Re-enable System Integrity Protection Once you have your works done, it is STRONGLY recommended that you Re-enable the System Integrity Protection
5) Reboot your Mac to Recovery Mode again. (Hold down Command+R key)
6) Open Terminal when you are in the Recovery Mode screen
7) Enter the following code
csrutil enable /reboot
Again, to ensure you have Re-enable the System Integrity Protection, after reboot, use the Terminal to check using
csrutil status.
Hope this help anyone who have the same issue.