When I execute on osx El Capitan:
sudo gem update --system
I got the error:
Updating rubygems-update ERROR: While execut
Starting with El Capitan, Apple prevents user applications to modify /usr/bin for security reasons. So just install/update rubygems in the recommended folder, /usr/local/bin:
/usr/bin
/usr/local/bin
sudo gem update -n /usr/local/bin --system