Rack middleware deadlock
- by Joel
I include this simple Rack Middleware in a Rails application:
class Hello
def initialize(app)
@app = app
end
def call(env)
[200, {"Content-Type" => "text/html"}, "Hello"]
end
end
Plug it in inside environment.rb:
...
Dir.glob("#{RAILS_ROOT}/lib/rack_middleware/*.rb").each do |file|
require file
end
Rails::Initializer.run…