Bugs item #29191, was opened at 2011-05-09 16:54
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29191&group_id=126

Category: `gem` commands (other)
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Aaron Patterson (aaronp)
Assigned to: Nobody (None)
Summary: `gem uninstall` complains when the target gem is a development 
dependency

Initial Comment:
When I try to uninstall a gem (for example rake), rubygems tells me about all 
of the gems that *depend* on that gem.  Unfortunately it does not differentiate 
between development dependencies and regular dependencies.

I think it should either a) only look at runtime dependencies, or b) indicate 
the relationship between the gems (*say* it's a development dep).

Here is an example where I try to uninstall rake.  Note that rake is simply a 
dev dep of mocha:


[aaron@higgins ~]$ sudo gem uninstall rake
Password:

You have requested to uninstall the gem:
        rake-0.8.7
RedCloth-4.2.7 depends on [rake (~> 0.8.7)]
cucumber-0.10.2 depends on [rake (>= 0.8.7)]
ffi-1.0.7 depends on [rake (>= 0.8.7)]
gherkin-2.3.6 depends on [rake (>= 0.8.7)]
hoe-2.9.4 depends on [rake (>= 0.8.7)]
launchy-0.4.0 depends on [rake (>= 0.8.1)]
launchy-0.4.0 depends on [rake (~> 0.8.7)]
mocha-0.9.12 depends on [rake (>= 0)]
orm_adapter-0.0.4 depends on [rake (>= 0.8.7)]
thor-0.14.6 depends on [rake (>= 0.8)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  n
ERROR:  While executing gem ... (Gem::DependencyRemovalException)
    Uninstallation aborted due to dependent gem(s)
[aaron@higgins ~]$ gem spec mocha dependencies
--- 
- !ruby/object:Gem::Dependency 
  name: rake
  prerelease: false
  requirement: &id001 !ruby/object:Gem::Requirement 
    none: false
    requirements: 
    - - ">="
      - !ruby/object:Gem::Version 
        hash: 3
        segments: 
        - 0
        version: "0"
  type: :development
  version_requirements: *id001

[aaron@higgins ~]$ 


----------------------------------------------------------------------

>Comment By: Aaron Patterson (aaronp)
Date: 2011-05-09 16:57

Message:
Also, here is my gem env output:


RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.1
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-10
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/aaron/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org/";]
     - "gemcutter_key" => "********************************"
     - "install" => "--format-executable --no-user-install"
     - "update" => "--format-executable --no-user-install"
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29191&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to