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 -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 8 August 2010 22:01, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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.rbThe 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mear wrote:> On 8 August 2010 22:01, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >> 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. > > ChrisThanks Chris. I tried to make the application from scratch again, and notices that I get the following when I run: $ rake db:migrate (in /Users/abder/Desktop/Rails/auth) == DeviseCreateUsers: migrating =============================================-- create_table(:users) rake aborted! An error has occurred, this and all later migrations canceled: undefined method `registerable'' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x1b2c8c4> (See full trace by running task with --trace) Provided that "user.rb" and the migration files are as shown in the attachment. Thanks. Attachments: http://www.ruby-forum.com/attachment/4928/Files.zip -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > 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 On Sun, Aug 8, 2010 at 6:56 PM, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>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? > -- > Posted via http://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I see. Thanks a lot. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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? -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.