Why not just do something like the following?
group :production do gem "rack-timeout" end
In theory, uninstalling middleware in the initializer should take care of the problem after the server restarts, assuming you are talking about putting something in config/initializers/
.
I did a little more experimentation and reset this to config/initializers/rack-timeout.rb
:
if Rails.env.production? Rack::Timeout.timeout = 0.5 else Rails.configuration.middleware.delete Rack::Timeout end
And this is in the forest controller:
sleep 1
Everything seemed healthy after restarting the dev server (no timeouts in sight: D). So maybe just a bad variable.
I still think that using only the production team is the best solution.
Ran with Rails 3.2.2 with Ruby 1.9.2-p290 on OSX.
source share