Bugs item #29253, was opened at 2011-06-04 13:34
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29253&group_id=126

Category: `gem install` command
Group: v1.8.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Eric Hodel (drbrain)
Assigned to: Nobody (None)
Summary: Gem plugins + gem install -i causes activation errors

Initial Comment:
Steps to reproduce:

gem install rubygems-test (has a rake dependency)
gem install rake -v 0.8.7
gem install rake

gem install -i /tmp/gems rake

Expected results:

rake installed in /tmp/gems

Actual results:

./lib/rubygems/dependency.rb:252:in `to_specs': Could not find rake (>= 0.8.7) 
amongst [] (Gem::LoadError)
        from ./lib/rubygems/specification.rb:760:in `find_in_unresolved'
        from ./lib/rubygems/specification.rb:760:in `map'
        from ./lib/rubygems/specification.rb:760:in `find_in_unresolved'
        from ./lib/rubygems/custom_require.rb:43:in `require'
        from ./lib/rubygems/remote_fetcher.rb:63:in `initialize'
        from ./lib/rubygems/remote_fetcher.rb:48:in `new'
        from ./lib/rubygems/remote_fetcher.rb:48:in `fetcher'
        from ./lib/rubygems/spec_fetcher.rb:66:in `initialize'
        from ./lib/rubygems/spec_fetcher.rb:43:in `new'
        from ./lib/rubygems/spec_fetcher.rb:43:in `fetcher'
        from ./lib/rubygems/dependency_installer.rb:129:in 
`find_gems_with_sources'
        from ./lib/rubygems/dependency_installer.rb:269:in 
`find_spec_by_name_and_version'
        from ./lib/rubygems/dependency_installer.rb:300:in `install'
        from ./lib/rubygems/commands/install_command.rb:124:in `execute'
        from ./lib/rubygems/commands/install_command.rb:118:in `each'
        from ./lib/rubygems/commands/install_command.rb:118:in `execute'
        from ./lib/rubygems/command.rb:278:in `invoke'
        from ./lib/rubygems/command_manager.rb:161:in `process_args'
        from ./lib/rubygems/command_manager.rb:120:in `run'
        from ./lib/rubygems/gem_runner.rb:64:in `run'
        from /usr/bin/gem:21

`gem install -i path` changes the source directory for Gem::Specification so no 
gems are available.

This works with RubyGems 1.7.2 and older, probably due to separate 
Gem::SourceIndexes for installation of gems and for loading gems.

A workaround is to uninstall rubygems-test or uninstall the old version of rake.

A possible fix could be to force-resolve dependencies when changing 
Gem::Specification's source directories

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29253&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