I''m running: WinXP-Pro/SP3 Rails 2.3.5 MySQL 5.0.37-community-nt Firefox 3.6 browser Mongrel web server I have a Rails 2 app that initially brought up the Welcome screen I ran: ruby script/generate scaffold vendor nickname:string qbname:string I discovered that config\routes.ruby.rb now starts out: ActionController::Routing::Routes.draw do |map| map.resources :vendors Following the advice of routes.rb, I renamed public\index.html by appending "-renamed" When I give the browser http://localhost:3000/, I get: Routing Error No route matches "/" with {:method=>:get} So the map.resources :vendors is not enough to get to: app\controllers\application_controller.rb and app\views\vendors\something-or-other Suggestions greatly appreciated. Thanks in Advance, Richard -- 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.
Hi, With that configuration in routes.rb you have to go to http://localhost:3000/vendors to get to your index action of the controller. If you want to go directly you need to add map.root :controller => ''vendors'', :action => ''index'' to your routes.rb I hope that helps. -- 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.
That was perfect. I studying an on-line tutorial on REST, but its slow going. Thanks for help to get my Rails app to run. On Feb 24, 4:21 pm, comopasta Gr <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > > With that configuration in routes.rb you have to go tohttp://localhost:3000/vendorsto get to your index action of the > controller. > > If you want to go directly you need to add map.root :controller => > ''vendors'', :action => ''index'' to your routes.rb > > I hope that helps. > -- > 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.
Restarting the server might do the trick in most cases at the app level, "ruby script/server" -- 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.