全新安装后Rails路由错误

mar*_*ion 1 ruby-on-rails ruby-on-rails-3

我刚刚在Windows 7机器上安装了Rails等.

创建了我的第一个应用程序,我正在尝试转到第一个生成的应用程序,这就是我得到的:

Routing Error

No route matches "/say/hello"
Run Code Online (Sandbox Code Playgroud)

其中说是应用程序名称,hello是第一个视图的名称.

思考?

Mar*_*ing 6

如果您正在实现非常简单的路由(因为这是您的第一个应用程序,我假设这是您想要的!),请确保您在routes.rb中取消注释了最后一个路由:

match ':controller(/:action(/:id(.:format)))'
Run Code Online (Sandbox Code Playgroud)

这将发送/ say/hello到控制器的hello动作say.