This project is archived and is in readonly mode.
Can't alter the middleware stack in environment.rb
Reported by Ben Scofield | July 25th, 2009 @ 02:30 PM | in 2.x
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.
Comments and changes to this ticket
-
Ben Scofield July 27th, 2009 @ 10:59 AM
- Tag changed from configuration, rails3 to 3.0, configuration, rails3
-
Rizwan Reza January 20th, 2010 @ 10:30 AM
- State changed from new to resolved
Now you can configure your middleware in Rails 3 and I've verified it.
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>