On 8 August 2010 22:01, Abder-Rahman Ali <[email protected]> wrote:
> I'm following this tutorial:
> http://railstutorial.org/chapters/filling-in-the-layout#sec:layout_links
>
> When I try to visit http://localhost:3000/pages/home for example, I get
> No route matches "/pages/home"
>
> What is the problem in my routes.rb file. You can find this file as an
> attachment.
>
> Thanks.
>
> Attachments:
> http://www.ruby-forum.com/attachment/4927/routes.rb

The problem is exactly what it says: there's no route for 'pages/home'
in that routes.rb.

You can add one with:

match 'pages/home' => 'pages#home'

or, if you want to match all actions in PagesController under a
similar URL scheme, you could do something like:

match 'pages/:action', :controller => 'pages'

Was there a line already in your routes.rb that you thought would
match this URL? If so, let us know, as we might be able to point you
towards a better understanding of the route mapping system.

Chris

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to