Hi All, I am new to Ruby on Rails and have rails3 installed. After I type this on the command line $rails g controller Pages home contact then, I go to http://localhost:3000/pages/home I got Routing Error No route matches "/pages/contact" How can I fix this problem? Thanks! -- 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 Fri, Feb 26, 2010 at 12:47 PM, John Wu <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi All, > > I am new to Ruby on Rails and have rails3 installed. > > After I type this on the command line > > $rails g controller Pages home contact > > then, I go to http://localhost:3000/pages/home > > I got > > Routing Error > > No route matches "/pages/contact" > > How can I fix this problem? > > Thanks! >Please post your routes file. -Conrad> -- > 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.
Thanks for the reply. I didn''t change rout file. SampleApp::Application.routes.draw do |map| end What do I need to add? Conrad Taylor wrote:> On Fri, Feb 26, 2010 at 12:47 PM, John Wu <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >> I got >> >> Routing Error >> >> No route matches "/pages/contact" >> >> How can I fix this problem? >> >> Thanks! >> > > Please post your routes file. > > -Conrad-- 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 26 February 2010 20:47, John Wu <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi All, > > I am new to Ruby on Rails and have rails3 installed.Did you really mean to start with rails 3? It is still under development and you may well run into problems that are not of your own making. If you are learning rails I would suggest installing the latest 2.3.x and you will find getting started guides to help you get going at http://guides.rubyonrails.org. I believe that it is necessary to uninstall rails 3 before installing 2.3.x though I may be mistaken. Colin -- 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.
Thanks, How to uninstall it on mac? Can I have two version of Rails on same machine that I can choose one to run? Colin Law wrote:> On 26 February 2010 20:47, John Wu <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Hi All, >> >> I am new to Ruby on Rails and have rails3 installed. > > Did you really mean to start with rails 3? It is still under > development and you may well run into problems that are not of your > own making. If you are learning rails I would suggest installing the > latest 2.3.x and you will find getting started guides to help you get > going at http://guides.rubyonrails.org. I believe that it is > necessary to uninstall rails 3 before installing 2.3.x though I may be > mistaken. > > Colin-- 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.
Hello, Here''s how your routes.rb file should like for that /pages/home route to work: http://gist.github.com/316367 In rails 3 rule for catching non-rest routes is deprecated so it''s commented out in routes.rb. You can read about it in Rails 3.0 Release Notes - http://guides.rails.info/3_0_release_notes.html#action-dispatch On Feb 26, 10:47 pm, John Wu <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi All, > > I am new to Ruby on Rails and have rails3 installed. > > After I type this on the command line > > $rails g controller Pages home contact > > then, I go tohttp://localhost:3000/pages/home > > I got > > Routing Error > > No route matches "/pages/contact" > > How can I fix this problem? > > Thanks! > -- > Posted viahttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Rails 3 doesn''t come with a generic rout mapping for controllers.<br> The generator for models or scaffold will add the models as resources routes, so it will be RESTfull by default.<br> <br> It means that in any new rails 3 app, you will have to explicitly change the routes.rb to add the routes that are not related to a REST resource.<br> Isn''t it great? I love rails 3.<br> <br> []''s<br> <br> Felipe<br> <br> Ugis Ozols wrote: <blockquote cite="mid:72bfba2a-fab7-4134-aab6-ffe31dd2fff0-H1+3MHXQzFaWKPJIvrCwTVYGCWtFR9XvxddQ6fo/n9Y@public.gmane.orgom" type="cite"> <pre wrap="">Hello, Here''s how your routes.rb file should like for that /pages/home route to work: <a class="moz-txt-link-freetext" href="http://gist.github.com/316367">http://gist.github.com/316367</a> In rails 3 rule for catching non-rest routes is deprecated so it''s commented out in routes.rb. You can read about it in Rails 3.0 Release Notes - <a class="moz-txt-link-freetext" href="http://guides.rails.info/3_0_release_notes.html#action-dispatch">http://guides.rails.info/3_0_release_notes.html#action-dispatch</a> On Feb 26, 10:47 pm, John Wu <a class="moz-txt-link-rfc2396E" href="mailto:li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org"><li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">Hi All, I am new to Ruby on Rails and have rails3 installed. After I type this on the command line $rails g controller Pages home contact then, I go tohttp://localhost:3000/pages/home I got Routing Error No route matches "/pages/contact" How can I fix this problem? Thanks! -- Posted viahttp://www.ruby-forum.com/. </pre> </blockquote> <pre wrap=""><!----> </pre> </blockquote> </body> </html> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.<br /> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org<br /> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.<br /> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.<br />