I think I found a bug in rails master branch, but maybe I'm doing
something wrong, so I don't want to open ticket on lighthouse yet.
I want to use Rack::Static middleware in my app, but it's not working.
Also worth mentioning is that all is working fine, when I'm using
rails 3.0.0.beta gem, problem is at rails master.
Steps to reproduce bug:
- Generate app
- Use git source pointing at master in Gemfile for rails
- Create config/initializers/static.rb and put:
Rails::Application.middleware.use Rack::Static, :urls => ["/
example.css"], :root => "tmp"
- launch server
When you go to localhost:3000/example.css it throws file not found
(it's ok then).
So next, create file tmp/example.css with some content.
Navigate to localhost:3000/example.css once more - request will be
very long and without success.
I also noticed that if you move Rack::Static before
ActionDispatch::Callbacks it works, but that's not what I want.
Anybody can help?