Mar 20 2012

Remove Invalid Ruby Gem Source

I was trying to install a Ruby gem and it keep failing. I keep getting the following error when installing a gem.

ERROR: http://gems.datamapper.org does not appear to be a repository
ERROR: could not find gem thin locally or in a repository

Because of the above error I couldn’t install a gem or even update my gem system.

I certainly don’t remember ever adding gems.datamapper.org as a gem source repository but now it is causing errors in my system. You can list all of your current gem source repositories by entering the following from your command prompt.

gem source

You may see a few gem sources possibly including repositories from rubyforge.org, rubyonrails.org, and github.com. In addition to these gems source, the problematic gems.datamapper.org was also listed in my system.

To remove the problematic source, gems.datamapper.org, enter the following command from the command prompt.

gem source -r http://gems.datamapper.org