Forum: Ruby on Rails How could I uninstall the build-in gems in Leopard

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
wenhao.xu@gmail.com (Guest)
on 2008-11-17 10:52
(Received via mailing list)
I am a newbie on the Mac and ROR. I am trying to install the rails on
my Leopard today and get its done. But I found for many of the gems,
there are tow versions installed on my machine. There is a lower
version installed at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/gems/1.8 and an updated version I installed
today at /Library/Ruby/Gems/1.8

For example,

stanley$ gem list -d rake -a

*** LOCAL GEMS ***

rake (0.8.3, 0.7.3)
    Author: Jim Weirich
    Rubyforge: http://rubyforge.org/projects/rake
    Homepage: http://rake.rubyforge.org
    Installed at (0.8.3): /Library/Ruby/Gems/1.8
                 (0.7.3): /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/gems/1.8

And if I run rake -V, it will tell me that the current version
executed is 0.8.3.

But if I tried to cleanup the old version installed on my machine, if
failed, as the following:

stanley$ sudo gem cleanup rake
Password:
Cleaning up installed gems...
:0:Warning: Gem::SourceIndex#search support for Regexp patterns is
deprecated
Attempting to uninstall rake-0.7.3
ERROR:  While executing gem ... (Gem::InstallError)
    Unknown gem rake = 0.7.3

I am wondering how could I uninstall the old version of these gems?

And another question is that I checked the rake file executed which
is /usr/bin/rake
I didn't find any information or path set there that told the console
which rake it should call? If I wanna to use an old version of rake or
even rails, how should I do?

Thanks
Frederick Cheung (Guest)
on 2008-11-17 11:05
(Received via mailing list)
On Nov 17, 8:46 am, "wenhao...@gmail.com" <wenhao...@gmail.com> wrote:

> I am wondering how could I uninstall the old version of these gems?
>
> And another question is that I checked the rake file executed which
> is /usr/bin/rake
> I didn't find any information or path set there that told the console
> which rake it should call? If I wanna to use an old version of rake or
> even rails, how should I do?
>
To be honest, I wouldn't bother. If it's in /System, leaving it alone
is generally a good idea. It doesn't do any harm having multiple
versions of gems installed. The executables gem installs try and load
the most recent version of the associated gem. You can force a
particular one, eg

rake _0.7.3_

runs that version of rake.

Fred
Brian Hogan (Guest)
on 2008-11-17 22:24
(Received via mailing list)
On our setups, we simply use the built-in mac stuff and then update the
old
versions.

gem update --system
gem install rails

You can safely ignore the old versions without a problem.


On Mon, Nov 17, 2008 at 4:04 AM, Frederick Cheung <
wenhao.xu@gmail.com (Guest)
on 2008-11-23 15:48
(Received via mailing list)
Thanks for both of you. It looks like the simple way is ignoring it...
Michael (Guest)
on 2009-01-09 15:58
(Received via mailing list)
Thanks for the tip Brian, I am trying it out now.  I did a 'gem update
rails' and it started to cough up the following:

michael@Mac-Pro:~/Desktop/rails_demo$ rails blog
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems.rb:379:in `report_activate_error': RubyGem version error:
rake(0.7.3 not >= 0.8.3) (Gem::LoadError)

Will report after trying this. Thanks :)

Cheers
Mike
Michael (Guest)
on 2009-01-09 15:58
(Received via mailing list)
It works!! Thanks :)
This topic is locked and can not be replied to.