Fixed #3127 - Fixed gem selection regex
Previously if the gem json_pure was installed and you requested the
gem json then the regex matched too soon and falshly indicated that
the json gem was already installed.
Also updated to add the --no-ri and no-rdoc options and fix tests.