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

问题描述 投票:0回答:1

[我有一个关于红宝石的项目,我做了一个脚手架,然后出现一个错误,即没有路线与[GET]“ / info / routes”匹配,然后将此行添加到routes.db。

root :to => 'index#index'

现在它给了我这个错误,我找不到解决方法。

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

有人知道解决方案吗?

ruby-on-rails heroku scaffolding
1个回答
0
投票

实际上,我正在做一个API项目,但它抱怨没有索引。我修改为root:to =>'alunos#index'并成功了!

© www.soinside.com 2019 - 2024. All rights reserved.