From: Eric Hodel Date: 2009-03-05T03:27:36+09:00 Subject: Re: gem cleanup problem On Mar 4, 2009, at 06:27, Tom Cloyd wrote: > I'm running Kubuntu Linux 8.10, and Rubygems 1.3.1. > > I'm trying to remove a sizable number of outdated gem versions, > using the 'gem update' command. Initially, it appeared to be choking > on RedCloth. I kept getting: > > ~$ sudo gem cleanup > Cleaning up installed gems... Attempting to uninstall > RedCloth-4.1.1 > ERROR: While executing gem ... (Gem::InstallError) > Unknown gem RedCloth = 4.1.1 > My immediately previous 'gem list' had shown (among other things) - > > RedCloth (4.1.9, 4.1.1) > > So I tried to uninstall RedCloth completely, thinking there must be > something wrong with it (although I'd seen no indication of this > elsewhere). Rubygems reported successfully uninstalling v. 4.1.9. No > mention of 4.1.1. It still appeared in the 'gem list'. > > Reissuing the command, I get this: > > $ sudo gem uninstall RedCloth > ERROR: While executing gem ... (Gem::InstallError) > Unknown gem RedCloth >= 0 > So I went after it manually, and just deleted the gem and associated > docs. > > But the problem just reappeared, with a different gem. Not a > RedCloth problem after all. > > $ sudo gem cleanup > Cleaning up installed gems... > Attempting to uninstall bones-2.3.1 > ERROR: While executing gem ... (Gem::InstallError) > Unknown gem bones = 2.3.1 > tomc@tomc-desktop:~$ > > I don't understand the problem here. Can anyone offer me a clue? gem cleanup doesn't handle multiple gem repos well yet, this may be your problem: $ gem list -d rails *** LOCAL GEMS *** rails (2.2.2, 1.2.6) Author: David Heinemeier Hansson Rubyforge: http://rubyforge.org/projects/rails Homepage: http://www.rubyonrails.org Installed at (2.2.2): /Library/Ruby/Gems/1.8 (1.2.6): /System/Library/Frameworks/Ruby.framework/ Versions/1.8/usr/lib/ruby/gems/1.8 [...] $ sudo gem cleanup rails Password: Cleaning up installed gems... :0:Warning: Gem::SourceIndex#search support for Regexp patterns is deprecated Attempting to uninstall rails-1.2.6 ERROR: While executing gem ... (Gem::InstallError) Unknown gem rails = 1.2.6 $