This is what Rails rail guides say about the basic objects of a Rack application:
ApplicationName :: Application is the main object of the Rack Rails application. Any rack-compatible web server must use ApplicationName :: Application to serve the Rails application.
So ActionController::Dispatcher.new just been replaced with ApplicationName::Application . I am not sure when they made this switch. This worked for me:
Blog::Application.call(env).last.body
(The first few lines after NoMethodError: undefined method 'key?' for nil:NilClass tell us that the key? Method is called in actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb . Going back, we see that the variable
params = env['action_dispatch.request.path_parameters']
not if it should not be. Thus, we can set env['action_dispatch.request.path_parameters'] in the console, but this leads to another NoMethodError for the nil object set in the initialize method. That way, we could fix this by passing a hash of the hash of the Dispatcher.new options, but it is probably best to use ApplicationName::Application .)
source share