[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

gem cleanup problem

Tom Cloyd

3/4/2009 2:28:00 PM

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?

Thanks!

Tom

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


11 Answers

lasitha

3/4/2009 5:25:00 PM

0

On Wed, Mar 4, 2009 at 7:57 PM, Tom Cloyd <tomcloyd@comcast.net> wrote:
> ~$ sudo gem cleanup
> Cleaning up installed gems... =A0 =A0 =A0 Attempting to uninstall RedClot=
h-4.1.1
> ERROR: =A0While executing gem ... (Gem::InstallError)
> =A0 Unknown gem RedCloth =3D 4.1.1

Tom, sounds a lot like #22770:
http://rubyforge.org/tracker/index.php?func=3Ddetail&aid=3D22770&...
=3D126&atid=3D575

Which seems to have a workaround detailed at the bottom of:
http://www.ruby-forum.com/to...

HTH,
lasitha

Tom Cloyd

3/4/2009 6:04:00 PM

0

lasitha wrote:
> On Wed, Mar 4, 2009 at 7:57 PM, Tom Cloyd <tomcloyd@comcast.net> wrote:
>
>> ~$ 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
>>
>
> Tom, sounds a lot like #22770:
> http://rubyforge.org/tracker/index.php?func=detail&aid=22770&group_id=126&am...
>
> Which seems to have a workaround detailed at the bottom of:
> http://www.ruby-forum.com/to...
>
> HTH,
> lasitha
>
>
>
Thanks very much for the assist. I have no knowledge of this problem, so
your help is a potential lifesaver - will go check this info. out
immediately!

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Tom Cloyd

3/4/2009 6:26:00 PM

0

lasitha wrote:
> On Wed, Mar 4, 2009 at 7:57 PM, Tom Cloyd <tomcloyd@comcast.net> wrote:
>
>> ~$ 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
>>
>
> Tom, sounds a lot like #22770:
> http://rubyforge.org/tracker/index.php?func=detail&aid=22770&group_id=126&am...
>
> Which seems to have a workaround detailed at the bottom of:
> http://www.ruby-forum.com/to...
>
> HTH,
> lasitha
>
>
>
OK, after digesting the information you kindly directed me to, here's
what the consensus appears to be:

1. the "gem clean" command is broken, at least some of the time. For me,
in my environment, all the time.
2. the "workaround" is to uninstall each gem and reinstall it. With
about 25 gems installed, that definitely a delightful prospect. It's
even worse when one considers that, as I documented in my original
email, the 'gem uninstall' command is also broken.

Uh...which brings up the subject of tests. I now understand enough about
test to suggest that perhaps the test suite for rubygems isn't doing its
job. Just a thought. Time for a little "heckle" session?

Oh well. Having 60 gems installed when only 25 are needed is tolerable.
Won't need a bailout on this one...!

t.
But what do I know?



--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Eric Hodel

3/4/2009 6:28:00 PM

0

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/proj...
Homepage: http://www.rubyo...
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
$

Eric Hodel

3/4/2009 6:29:00 PM

0

On Mar 4, 2009, at 10:25, Tom Cloyd wrote:

> Uh...which brings up the subject of tests. I now understand enough
> about test to suggest that perhaps the test suite for rubygems isn't
> doing its job. Just a thought.

Some areas are covered very well, others are not.

> Time for a little "heckle" session?

I am eagerly awaiting your patches. Dedicated patch providers get
commit.

lasitha

3/4/2009 7:00:00 PM

0

On Wed, Mar 4, 2009 at 11:55 PM, Tom Cloyd <tomcloyd@comcast.net> wrote:
>
> the consensus appears to be:
>
> 1. the "gem clean" command is broken, at least some of the time. For me, in
> my environment, all the time.
> 2. the "workaround" is to uninstall each gem and reinstall it. With about 25
> gems installed, that definitely a delightful prospect. It's even worse when
> one considers that, as I documented in my original email, the 'gem
> uninstall' command is also broken.
>

As Eric noted, the trouble comes about when you have multiple
repositories. There may be good reason for such a setup, but if there
isn't _and_ most of your outdated gems are in one of them, you could
just blow that one away (rm -rf).

In my case the only reason i've had multiple repos is when i forget to
sudo and end up with gems in ~/.gem. I've blown that one away a
couple times and that hasn't bothered rubygems any, as far i can tell.

Cheers,
lasitha.

Tom Cloyd

3/4/2009 8:51:00 PM

0

Eric Hodel wrote:
> On Mar 4, 2009, at 10:25, Tom Cloyd wrote:
>
>> Uh...which brings up the subject of tests. I now understand enough
>> about test to suggest that perhaps the test suite for rubygems isn't
>> doing its job. Just a thought.
>
> Some areas are covered very well, others are not.
Ahem. Familiar with the problem am I.
>
>> Time for a little "heckle" session?
>
> I am eagerly awaiting your patches. Dedicated patch providers get
> commit.
>
>
oh man. Your apparent (if not actual!) faith in my coding abilities is
easily the highlight of my day. In only it were true....

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Tom Cloyd

3/4/2009 8:56:00 PM

0

Eric Hodel wrote:
> 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/proj...
> Homepage: http://www.rubyo...
> 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
> $
>
>
Bingo. That's it. I have ruby 1.8.7 installed, and recently installed
1.9 as well. It never occurred to me that Rubygems was catching both
installs, and that is clearly the case. Hadn't used the 'gem list -d {}'
command until I read your email. Problem explained, if not solved.
Interesting....

A day full of bright spots of all sorts!

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Eric Hodel

3/5/2009 12:41:00 AM

0

On Mar 4, 2009, at 12:56, Tom Cloyd wrote:
> Eric Hodel wrote:
>>> $ 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/proj...
>> Homepage: http://www.rubyo...
>> 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
>> $
>>
>>
> Bingo. That's it. I have ruby 1.8.7 installed, and recently
> installed 1.9 as well. It never occurred to me that Rubygems was
> catching both installs, and that is clearly the case. Hadn't used
> the 'gem list -d {}' command until I read your email. Problem
> explained, if not solved. Interesting....

I forgot the workaround:

sudo sh -c 'GEM_PATH=`gem env home` gem cleanup'

Tom Cloyd

3/5/2009 1:27:00 AM

0

Eric Hodel wrote:
> On Mar 4, 2009, at 12:56, Tom Cloyd wrote:
>> Eric Hodel wrote:
>>>> $ 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/proj...
>>> Homepage: http://www.rubyo...
>>> 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
>>> $
>>>
>>>
>> Bingo. That's it. I have ruby 1.8.7 installed, and recently installed
>> 1.9 as well. It never occurred to me that Rubygems was catching both
>> installs, and that is clearly the case. Hadn't used the 'gem list -d
>> {}' command until I read your email. Problem explained, if not
>> solved. Interesting....
>
> I forgot the workaround:
>
> sudo sh -c 'GEM_PATH=`gem env home` gem cleanup'
>
>
Ah, lovely. Thanks a lot!

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~