gem uninstall problem

J

Jim Freeze

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
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?
 
J

Jim Weirich

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.
 
J

Jim Freeze

* Jim Weirich said:
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?
 
J

Jim Weirich

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top