有时候 rails 会出现:
"No route matches"错误,
可以利用如下方法解决;
找到 config/routes.rb 文件, 打开编辑, 找到如下行:
# See how all your routes lay out with "rake routes"
在这行下面添加一行, 内容如下:
map.connect '',:controller=>"index",:action=>"index"
"No route matches"错误,
可以利用如下方法解决;
找到 config/routes.rb 文件, 打开编辑, 找到如下行:
# See how all your routes lay out with "rake routes"
在这行下面添加一行, 内容如下:
map.connect '',:controller=>"index",:action=>"index"
本文介绍了解决Rails应用中出现的Noroutematches错误的方法。通过在config/routes.rb文件中添加一行代码:map.connect'', :controller=>index :action=>index,可以有效解决该问题。

1221

被折叠的 条评论
为什么被折叠?



