This project is archived and is in readonly mode.

#5146 ✓wontfix
Alex Chaffee

ActionPack 2.3.8 gem declares incompatibility with rack 1.2

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

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

Comments and changes to this ticket

  • Alex Chaffee

    Alex Chaffee July 18th, 2010 @ 09:16 PM

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

  • Rohit Arondekar

    Rohit Arondekar July 19th, 2010 @ 11:03 AM

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

  • José Valim

    José Valim July 19th, 2010 @ 11:19 AM

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

  • Jamie Hill

    Jamie Hill January 7th, 2011 @ 02:58 PM

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

  • bingbing

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages