On Apr 7, 6:51 pm, Bruce Wilson <bwilson...@yahoo.com> wrote: > My routes.rb reads at the top: > > Hello::Application.routes.draw do > match ':controller(/:action(/:id(.:format)))' > > and then all the commented material it comes with and an "end" at the > end of the file. > > But when I typehttp://localhost:3000into my browser I get the > following error message: > > Routing Error > No route matches "/" > > I'm stumped. > The above means that rails can only recognized paths that start with the name of a controller, optionally followed by an action and id. '/' clearly doesn't fall into that pattern so you get a routing error. One way of specifying a default root is by saying
root :to => 'pages#main' which says that / should be routed to the main action in PagesController Fred > Bruce -- 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 rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.