Gem uninstall problem

Hi

Gems is giving me fits with uninstalling activerecord,
however, it uninstalls rails just fine.

Here is what I get for rails:

gem list rails
Config file /Users/jdf/.gemrc does not exist

*** LOCAL GEMS ***

rails (0.9.5, 0.9.4.1, 0.9.3, 0.9.2, 0.9.1)
     Web-application framework with template engine, control-flow layer,
     and ORM.

gem uninstall rails -v 0.9.1
Config file /Users/jdf/.gemrc does not exist
Attempting to uninstall gem 'rails'
Successfully uninstalled rails version 0.9.1

Ok, fine, now for activerecord

gem list activerecord
Config file /Users/jdf/.gemrc does not exist

*** LOCAL GEMS ***

activerecord (1.8.0, 1.6.0, 1.5.1, 1.4.0, 1.3.0)
     Implements the ActiveRecord pattern for ORM.

gem uninstall activerecord -v 1.8.0
Config file /Users/jdf/.gemrc does not exist
Attempting to uninstall gem 'activerecord'
You have requested to uninstall the gem:
         activerecord-1.3.0
         activerecord-1.4.0
         activerecord-1.6.0
         activerecord-1.5.1
         activerecord-1.8.0
rails-0.9.2 depends on [activerecord (>= 1.3.0)]
If you remove this gem, the dependency will not be met.
Uninstall anyway? [yN] n
ERROR: While executing gem ... (Gem::DependencyRemovalException)
     Uninstallation aborted due to dependent gem(s)

gem uninstall activerecord
Config file /Users/jdf/.gemrc does not exist
Attempting to uninstall gem 'activerecord'

Select RubyGem to uninstall:
  1. activerecord-1.3.0
  2. activerecord-1.4.0
  3. activerecord-1.5.1
  4. activerecord-1.6.0
  5. activerecord-1.8.0
  6. All versions
> 5
You have requested to uninstall the gem:
         activerecord-1.3.0
         activerecord-1.4.0
         activerecord-1.6.0
         activerecord-1.5.1
         activerecord-1.8.0
rails-0.9.2 depends on [activerecord (>= 1.3.0)]
If you remove this gem, the dependency will not be met.
Uninstall anyway? [yN] n
ERROR: While executing gem ... (Gem::DependencyRemovalException)
     Uninstallation aborted due to dependent gem(s)

Am I doing something wrong?

···

--
Jim Freeze
Code Red. Code Ruby

Jim Freeze said:

Gems is giving me fits with uninstalling activerecord,
however, it uninstalls rails just fine.

gem uninstall activerecord -v 1.8.0
Config file /Users/jdf/.gemrc does not exist
Attempting to uninstall gem 'activerecord'
You have requested to uninstall the gem:
         activerecord-1.3.0
         activerecord-1.4.0
         activerecord-1.6.0
         activerecord-1.5.1
         activerecord-1.8.0
rails-0.9.2 depends on [activerecord (>= 1.3.0)]
If you remove this gem, the dependency will not be met.

The current gems software is a bit sloppy in its dependency evaluations
while deleting. While it is true that rails-0.9.2 has a dependency that
is satisified by activerecord-1.8.0, it apparent from the listed
dependencies that the dependency is also satisfied by all the versions
1.3.0 through 1.5.1. Removing 1.8.0 shouldn't be a problem because there
are other versions of activerecord that can be used.

RubyGems 0.8.7 (out later this week) will handle this better.

Uninstall anyway? [yN] n

If you would have said "Yes, uninstall anyways", then the gem would have
been uninstalled as you intended.

The CVS version of gems will only ask you about the /last/ gem that
satisfies a dependency.

···

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

* Jim Weirich <jim@weirichhouse.org> [2005-03-09 03:56:22 +0900]:

Jim Freeze said:
> gem uninstall activerecord -v 1.8.0
> Config file /Users/jdf/.gemrc does not exist
> Attempting to uninstall gem 'activerecord'
> You have requested to uninstall the gem:
> activerecord-1.3.0
> activerecord-1.4.0
> activerecord-1.6.0
> activerecord-1.5.1
> activerecord-1.8.0
> rails-0.9.2 depends on [activerecord (>= 1.3.0)]
> If you remove this gem, the dependency will not be met.

If you would have said "Yes, uninstall anyways", then the gem would have

It looked to me that a 'Y' would have uninstalled
activerecord-1.3.0-activerecord-1.8.0. IS this
message going to be clearer in 1.8.7?

···

--
Jim Freeze
Code Red. Code Ruby

Jim Freeze said:

> gem uninstall activerecord -v 1.8.0
> Config file /Users/jdf/.gemrc does not exist
> Attempting to uninstall gem 'activerecord'
> You have requested to uninstall the gem:
> activerecord-1.3.0
> activerecord-1.4.0
> activerecord-1.6.0
> activerecord-1.5.1
> activerecord-1.8.0
> rails-0.9.2 depends on [activerecord (>= 1.3.0)]
> If you remove this gem, the dependency will not be met.

If you would have said "Yes, uninstall anyways", then the gem would have

It looked to me that a 'Y' would have uninstalled
activerecord-1.3.0-activerecord-1.8.0. IS this
message going to be clearer in 1.8.7?

Hmmm ... it does look like it selected all the versions of activerecord,
not just the 1.8.0 version. I will double check that code and make sure
the message is clearer.

Thanks for the feedback.

···

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)