我正在研究Rails项目,但出现了此错误,我不知道是什么原因。
Rails.application.routes.draw do
root to: 'static_page#login'
resources :static_page
resources :users
resources :locations
resources :timetracks
get 'account', to: 'static_page#account'
get 'map', to: 'static_page#map'
get 'login', to: 'static_page#login'
get 'signup', to: 'static_page#signup'
end
答案 0 :(得分:1)
这意味着您的代码中没有定义任何类,如StaticPageController。
//将其添加到您的控制器文件夹中