且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ActionController :: RoutingError(没有路由与[GET]"/"匹配):

更新时间:2023-02-17 10:47:59

您需要在routes.rb文件中设置根路由.

You need to setup a root route in routes.rb file.

root :to => 'index#index'

第一个索引是控制器名称(IndexController),第二个索引是IndexController中的动作名称.

Where the first index is the controller name (IndexController) and the second index is the action name in the IndexController.