Rails突然动作控制器异常

时间:2019-03-27 19:38:01

标签: ruby-on-rails ruby

enter image description here

我正在研究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

1 个答案:

答案 0 :(得分:1)

这意味着您的代码中没有定义任何类,如StaticPageController。

//将其添加到您的控制器文件夹中

类StaticPageController

结束