No route matches

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

Chris Mear wrote:

I have to REMOVE (Comment out) the following from the migration file for the $ rake db:migrate to work:

t.registerable t.validatable

Is that anything to do with Rails3.0.0.rc which I'm using?

I have to REMOVE (Comment out) the following from the migration file for

the $ rake db:migrate to work:

t.registerable

t.validatable

Is that anything to do with Rails3.0.0.rc which I’m using?

The 1.1 branch of devise doesn’t have those strategies as far as I’m aware. Here’s the github page: http://github.com/plataformatec/devise

What I’m seeing in terms of AR migration strategies on the 1.1 branch are the following: t.database_authenticatable t.recoverable t.renemberable t.trackable t.confirmable t.lockable t.token_authenticatable

Whatever guide you are following might be using the 1.0.X branch of devise which is intended for rails 2.3.2+. There have been some relatively large changes between the 1.0.X branch and the 1.1.X branch.

-Patrick Robertson

I see. Thanks a lot.

I tried to create the application from scratch once more and it worked WITHOUT removing anything.

I think in the preceding one that didn't work I had an issue with: $ rails generate devise:install

Although I ran this command but at at late point. I don't know if the ordering if this command matters especially before creating the devise model?