[Rubygems-developers] [ rubygems-Bugs-27867 ] RubyGems should not pre-activate dependencies that have no version requirement

noreply at rubyforge.org noreply at rubyforge.org
Mon Feb 22 06:54:14 EST 2010


Bugs item #27867, was opened at 2010-02-22 12:54
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27867&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Hongli Lai (hongli)
Assigned to: Nobody (None)
Summary: RubyGems should not pre-activate dependencies that have no version requirement

Initial Comment:
Suppose that we have an app Foo that depends on Bar, no specific version. At this time, running 'gem "foo"' will automatically activate the latest version of "bar". This behavior causes various problems. A concrete example:

- Rails 3.0pre depends on Rack 1.1.
- Rails 2.3 depends on Rack 1.0.
- Thin depends on Rack, no specific version.

If all of the above are installed, and one tries to use Thin to start a Rails 2.3 app, then it will fail. Thin's wrapper binary runs 'gem "thin"', which in turn activates Rack 1.1 immediately. When Thin starts Rails 2.3, Rails tries to activate Rack 1.0. As you can see, Thin + Rails 2.3 is completely broken just by having Rack 1.1 installed.

This can be solved adding an hypothetical --rack-version=xxx command line option to Thin, which would instruct Thin to activate a specific Rack version during startup so that one can start Rails 2.3 apps with:

  thin start --rack-version=1.0.0

However this is currently unimplementable because the RubyGems wrapper binary activates Rack during startup. I think it should only check whether Rack is installed, but not actually activate it until it's actually require'ed.

See also https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/4031-having-rails-23pre-or-rack-11-installed-breaks-rails-2x

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27867&group_id=126


More information about the Rubygems-developers mailing list