ERROR: could not find [gem] locally or in a repository
gem install --system
I ran into this issue the other day and the above code worked. You may or may not need to run "sudo gem update --system" of course if you get a permissions problem.
Also - if you need to get a little info about your installation and/or version of gems:
"gem env"