NameError: uninitialized constant ActionController::Dispatcher

谁说胖子不能爱 提交于 2019-12-06 15:38:00

Take a look at config.ru, in my case it is:

> cat config.ru 
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run Wagn::Application

The file was generated for 3.0 with Main::Application and it was changed for our local name.

I used this for my app (Rack::Test):

def app
  Wagn::Application
end

Note there is no '.new', since this class is an application, not a middleware.

It looks ActionController::Dispatcher just doesn't exist in the version of rails you're using. If your following a book it's usually best to stick with the version of Rails the book was written for.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!