set up routes.rb as rack middleware for exception handling