Can't find/uninstall installed gems

I am having some issues while trying to uninstall a gem. I am using Mac
OS 10.6.2 system. Following are commands I tried to execute to uninstall
rails gem, but it didn't work.

{{{
$ sudo gem uninstall rails
Password:
INFO: gem "rails" is not installed

$ sudo gem uninstall rails -v 2.3.5
INFO: gem "rails" is not installed

# Specified version
$ sudo gem uninstall rails -v 2.3.5 --debug
Exception `NameError' at
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized
constant Gem::Commands::UninstallCommand
Exception `Gem::InstallError' at
/Library/Ruby/Site/1.8/rubygems/uninstaller.rb:73 - gem "rails" is not
installed
INFO: gem "rails" is not installed

$ sudo gem uninstall rails-2.3.5
Password:
INFO: gem "rails-2.3.5" is not installed
}}}

Although gem command output says 'rails is not installed', it is listed
in the installed gems list. Also, the gem which command is unable to
find it (tried with both sudo and non-sudo privileges).

{{{
$ sudo gem list rails

*** LOCAL GEMS ***

rails (2.3.5, 1.2.6)

$ sudo gem list rails -i
true

$ sudo gem which rails
ERROR: Can't find ruby library file or shared library rails

$ gem contents rails
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/README
..
...
}}}

The rails gem is installed (not sure if it comes pre-installed with Mac
OS X) in '/System/Library/Frameworks/Ruby.framework/Versions/1.8/'.

I tried 'uninstall' and 'which' commands with some other gems installed
in
'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems'
and '/Library/Ruby/Gems/1.8/gems' locations, but couldn't understand
what was going on. For example, 'which' is able to find xmpp4r gem here
(failed with rails command as mentioned earlier), but 'uninstall'
command
is failing.

{{{
$ gem which xmpp4r
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/xmpp4r-0.4/lib/xmpp4r.rb

$ gem uninstall xmpp4r
INFO: gem "xmpp4r" is not installed

$ sudo gem uninstall xmpp4r
INFO: gem "xmpp4r" is not installed

}}}

Any help on what might be wrong here? Am I missing something obvious the
way gem commands work?

- thanks,
neuby.r

···

--
Posted via http://www.ruby-forum.com/.

I'm not sure about your precise problem but I found ruby
version and gem management on OS X to be a total nightmare
until I started using RVM in single-user mode
see http://beginrescueend.com/

So you might try reinstalling with RVM and my guess is
the problem will go away.

Hope that helps.

Dan Nachbar

···

On Nov 10, 2011, at 8:51 PM, Neubyr Neubyr wrote:

I am having some issues while trying to uninstall a gem. I am using Mac
OS 10.6.2 system. ...

Any help on what might be wrong here? Am I missing something obvious the
way gem commands work?

I am having some issues while trying to uninstall a gem.

You can always rm the gem file manually.

gems/rails-2.3.5/

Just kill that directory.

···

--
Posted via http://www.ruby-forum.com/\.

-----Messaggio originale-----

···

Da: Neubyr Neubyr [mailto:neubyr@gmail.com]
Inviato: venerdì 11 novembre 2011 02:51
A: ruby-talk ML
Oggetto: can't find/uninstall installed gems

I am having some issues while trying to uninstall a gem. I am using Mac OS
10.6.2 system. Following are commands I tried to execute to uninstall rails
gem, but it didn't work.

{{{
$ sudo gem uninstall rails
Password:
INFO: gem "rails" is not installed

$ sudo gem uninstall rails -v 2.3.5
INFO: gem "rails" is not installed

# Specified version
$ sudo gem uninstall rails -v 2.3.5 --debug Exception `NameError' at
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized
constant Gem::Commands::UninstallCommand Exception `Gem::InstallError' at
/Library/Ruby/Site/1.8/rubygems/uninstaller.rb:73 - gem "rails" is not
installed
INFO: gem "rails" is not installed

$ sudo gem uninstall rails-2.3.5
Password:
INFO: gem "rails-2.3.5" is not installed }}}

Although gem command output says 'rails is not installed', it is listed in
the installed gems list. Also, the gem which command is unable to find it
(tried with both sudo and non-sudo privileges).

{{{
$ sudo gem list rails

*** LOCAL GEMS ***

rails (2.3.5, 1.2.6)

$ sudo gem list rails -i
true

$ sudo gem which rails
ERROR: Can't find ruby library file or shared library rails

$ gem contents rails
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
/gems/rails-2.3.5/README
..
...
}}}

The rails gem is installed (not sure if it comes pre-installed with Mac OS
X) in '/System/Library/Frameworks/Ruby.framework/Versions/1.8/'.

I tried 'uninstall' and 'which' commands with some other gems installed in
'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems'
and '/Library/Ruby/Gems/1.8/gems' locations, but couldn't understand
what was going on. For example, 'which' is able to find xmpp4r gem here
(failed with rails command as mentioned earlier), but 'uninstall'
command
is failing.

{{{
$ gem which xmpp4r
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
/gems/xmpp4r-0.4/lib/xmpp4r.rb

$ gem uninstall xmpp4r
INFO: gem "xmpp4r" is not installed

$ sudo gem uninstall xmpp4r
INFO: gem "xmpp4r" is not installed

}}}

Any help on what might be wrong here? Am I missing something obvious the way
gem commands work?

- thanks,
neuby.r

--
Posted via http://www.ruby-forum.com/.

--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Capodanno al parco Oltremare Riccione: Pacchetto hotel 3 stelle in centro + ingresso al parco.
* Mezza pensione, Internet gratis, animazione per bimbi. Scopri l'offerta!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid981&d)-12

-----Messaggio originale-----

···

Da: Marc Heiler [mailto:shevegen@linuxmail.org]
Inviato: venerdì 11 novembre 2011 18:39
A: ruby-talk ML
Oggetto: Re: can't find/uninstall installed gems

I am having some issues while trying to uninstall a gem.

You can always rm the gem file manually.

gems/rails-2.3.5/

Just kill that directory.

--
Posted via http://www.ruby-forum.com/\.

--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Capodanno a Riccione, Pacchetto Relax: Mezza Pensione + bagno turco + solarium + massaggio. Wifi e parcheggio gratis. 2 giorni euro 199 a persona
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid978&d)-12