[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Can't uninstall gems on Ubuntu

Alex 2k8

5/27/2009 2:57:00 PM

Hello,

I installed net-ssh gem from normal account, and got such warnings:

$ gem install net-ssh
WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /home/alex/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.

To make sure the gem installed:

$ gem list
*** LOCAL GEMS ***
net-ssh (2.0.11, 2.0.10)

Now I try to uninstall it.

$ gem uninstall net-ssh
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem net-ssh

$ gem list
*** LOCAL GEMS ***
net-ssh (2.0.11, 2.0.10)

So I installed a gem, but can't remove it. What is wrong here?

My system is Ubuntu 8.04,
$ gem -v
1.3.1

$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]

Thanks,
- Alex
--
Posted via http://www.ruby-....

6 Answers

Nation, Carey

5/27/2009 3:28:00 PM

0

Well, just a couple of guesses here, but:

It installed to your home directory because you don't have write rights
to the system directories. If you have sudo, sudo gem install net-ssh
might have worked.

The second warning on the install probably also tells you why it won't
uninstall. =20

-----Original Message-----
From: abc3def@gmail.com [mailto:abc3def@gmail.com]=20
Sent: Wednesday, May 27, 2009 10:57 AM
To: ruby-talk ML
Subject: Can't uninstall gems on Ubuntu

Hello,

I installed net-ssh gem from normal account, and got such warnings:

$ gem install net-ssh
WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /home/alex/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.

To make sure the gem installed:

$ gem list
*** LOCAL GEMS ***
net-ssh (2.0.11, 2.0.10)

Now I try to uninstall it.

$ gem uninstall net-ssh
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem net-ssh

$ gem list
*** LOCAL GEMS ***
net-ssh (2.0.11, 2.0.10)

So I installed a gem, but can't remove it. What is wrong here?

My system is Ubuntu 8.04,
$ gem -v
1.3.1

$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]

Thanks,
- Alex
--=20
Posted via http://www.ruby-....


Rick DeNatale

5/27/2009 5:23:00 PM

0

On Wed, May 27, 2009 at 11:28 AM, Nation, Carey <Carey.Nation@turner.com> w=
rote:
> Well, just a couple of guesses here, but:
>
> It installed to your home directory because you don't have write rights
> to the system directories. If you have sudo, sudo gem install net-ssh
> might have worked.
>
> The second warning on the install probably also tells you why it won't
> uninstall.

Actually, I think that it's because gem uninstall defaults to
installing from the system gem directory.

> =A0WARNING: =A0Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
> =A0 =A0 =A0 =A0 =A0 =A0/usr/bin aren't both writable.

I suspect that

$gem uninstall -i~/.gem net-ssh

might work.

--=20
Rick DeNatale

Blog: http://talklikeaduck.denh...
Twitter: http://twitter.com/Ri...
WWR: http://www.workingwithrails.com/person/9021-ric...
LinkedIn: http://www.linkedin.com/in/ri...

Nation, Carey

5/27/2009 6:52:00 PM

0

>>Actually, I think that it's because gem uninstall defaults to
>>installing from the system gem directory.

> =A0WARNING: =A0Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
> =A0 =A0 =A0 =A0 =A0 =A0/usr/bin aren't both writable.

Sorry for being vague. That's what I meant, actually. That is, since =
ruby in general couldn't run the gems there as the location wasn't in =
the path, it wouldn't be able to uninstall them, either.


Alex 2k8

5/27/2009 8:21:00 PM

0

> It installed to your home directory because you don't have write rights
> to the system directories. If you have sudo, sudo gem install net-ssh
> might have worked.

Yes, if done with sudo it works fine. But I cann't remove that wrongly
instaled gems :-)

The second warning seems useless, as I have no such folder at all
/home/alex/.gem/ruby/1.8/bin
--
Posted via http://www.ruby-....

Alex 2k8

5/27/2009 8:21:00 PM

0

> I suspect that
>
> $gem uninstall -i~/.gem net-ssh
>
> might work.

Unsuccessfully it does not :-(
--
Posted via http://www.ruby-....

Eric Hodel

5/30/2009 3:20:00 PM

0

On May 27, 2009, at 10:56, Alex 2k8 wrote:

> I installed net-ssh gem from normal account, and got such warnings:
>
> $ gem install net-ssh
> WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
> /usr/bin aren't both writable.
> WARNING: You don't have /home/alex/.gem/ruby/1.8/bin in your PATH,
> gem executables will not run.
>
> To make sure the gem installed:
>
> $ gem list
> *** LOCAL GEMS ***
> net-ssh (2.0.11, 2.0.10)
>
> Now I try to uninstall it.
>
> $ gem uninstall net-ssh
> ERROR: While executing gem ... (Gem::InstallError)
> Unknown gem net-ssh
>
> $ gem list
> *** LOCAL GEMS ***
> net-ssh (2.0.11, 2.0.10)
>
> So I installed a gem, but can't remove it. What is wrong here?

Upgrade to 1.3.4, the bug was fixed in the meantime.