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.

Can't alter the middleware stack in environment.rb

#2955

On edge (current as of 25 July, and dating back to 25 June), you can't manipulate the middleware stack by adding code like the following to environment.rb:

Rails::Initializer.run do |config|
config.middleware.use MyCustomMiddleware end

This raises the following error:

..../config/../vendor/rails/railties/lib/rails/configuration.rb:111:in middleware':NameError: uninitialized constant Rails::Configuration::ActionController

It looks like this was caused by the removal of a require 'action_controller' from within the middleware method.

Reported by Ben Scofield · July 25th, 2009 @ 02:30 PM

State: resolved
Milestone: 2.x
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: none

Activity

  1. Ben Scofield
    Ben Scofield
    • Tag changed from configuration, rails3 to 3.0, configuration, rails3

    July 27th, 2009 @ 10:59 AM

  2. Rizwan Reza
    Rizwan Reza

    This doesn't apply anymore.

    January 18th, 2010 @ 01:43 PM

  3. Rizwan Reza
    Rizwan Reza
    • State changed from new to resolved

    Now you can configure your middleware in Rails 3 and I've verified it.

    January 20th, 2010 @ 10:30 AM