Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActionPack 2.3.8 gem declares incompatibility with rack 1.2

#5146

ActionPack 2.3.8 is actually, really, very compatible with both rack 1.1 and 1.2. Yet it declares in its gemspec that it is compatible only with version 1.1.

This causes problems with gem activation, notably the dreaded Bundler error:

shared_helpers.rb:127:in `gem': can't activate rack (~> 1.1.0, runtime), already activated rack-1.2.0.

The patch is to change "~> 1.1.0" to "~> 1.1" in actionpack's gemspec, as follows:

  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
    s.add_runtime_dependency(%q<activesupport>, ["= 2.3.8"])
    s.add_runtime_dependency(%q<rack>, ["~> 1.1"])
  else
    s.add_dependency(%q<activesupport>, ["= 2.3.8"])
    s.add_dependency(%q<rack>, ["~> 1.1"])
  end
else
  s.add_dependency(%q<activesupport>, ["= 2.3.8"])
  s.add_dependency(%q<rack>, ["~> 1.1"])
end

This bug was reported against 2.3.5 and was incorrectly marked as invalid. There are two separate issues here: one is how to fix this problem if it comes up (which involves carefully ordering your Gemfile and is explained by Yehuda's blog post Named Gem Environments and Bundler
) and one which is that the dependency declaration for ActionPack needs to be corrected at the source.

See https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets...

Reported by Alex Chaffee · July 18th, 2010 @ 09:15 PM

State: wontfix
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Alex Chaffee
    Alex Chaffee

    The title of this bug should be "ActionPack 2.3.8 gem declares incompatibility with rack 1.2"

    July 18th, 2010 @ 09:16 PM

  2. Rohit Arondekar
    Rohit Arondekar
    • Title changed from ActionPack 2.3.8 gem declares incompatibility with rack 1.1.0 to ActionPack 2.3.8 gem declares incompatibility with rack 1.2
    • Importance changed from to Low

    Done.

    Note: I haven't set the priority to low, it's the default while making a comment in the issue tracker.

    July 19th, 2010 @ 11:03 AM

  3. José Valim
    José Valim
    • State changed from new to wontfix

    This and the other ticket are invalid. Rails may work with Rack 1.2 and but this is not necessarily true for Rack 1.3, so we cannot specify Rack ~> 1.1 as dependency. In fact, Rack 1.2 has a params parser bug which affects Rails 3 and will probably affect Rails 2.3 as well. Have you executed your test suite after changing the dependency to Rack 1.2?

    July 19th, 2010 @ 11:19 AM

  4. Jamie Hill
    Jamie Hill

    Has this been resolved yet as after installing Rails 3.0.3 on a server where many other Rails 2.3.5 running, all 2.3.5 apps have died! I'm not seeing why this patch can't be applied with Rack "~> 1.0"?

    January 7th, 2011 @ 02:58 PM

  5. bingbing