簡體   English   中英

ActionController::RoutingError(未初始化的常量 IndexController

[英]ActionController::RoutingError (uninitialized constant IndexController

我有一個關於 ruby​​ on rails 的項目,我做了一個腳手架,然后我得到一個錯誤,沒有路由匹配 [GET] "/info/routes",然后我將此行添加到 routes.db。

root :to => 'index#index'

現在它給了我這個錯誤,我找不到解決方案。

ActionController::RoutingError (uninitialized constant IndexController Did you mean?  IndexError):

有人知道解決方案嗎?

實際上我在做一個 API 項目,但它抱怨沒有索引。 我修改為 root :to => 'alunos#index' 並且它起作用了!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM