routes.rb and static html files in public/

I bet the reason is

   1. First the web server looks for a static resource

   2a. If it finds it on disk it serves it

   2b. Otherwise it calls the Rail's dispatcher

If that's correct you are going through 2a.

-- fxn

Well, that certainly does not coincide with the reported behaviour at the beginning of the thread, but it is certainly what WEBrick does:

   def service(req, res) #:nodoc:      unless handle_file(req, res)        begin          REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency          unless handle_dispatch(req, res)            raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."          end        ensure          unless ActionController::Base.allow_concurrency            REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?          end        end      end    end

If handle_file() succeeds Rails is not reached.

-- fxn