Richard Pickett
2008-Jul-08 09:19 UTC
map.root doesn''t do anything, index.html can''t be changed
Environment: Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.4.6 PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch mod_ruby/1.2.6 Ruby/1.8.6(2007-09-24) mod_ssl/2.2.8 OpenSSL/0.9.8g Phusion_Passenger/2.0.1 Server I''ve created several scaffolds that all work, and am trying to set the root page for this app to default to one of the methods. Here''s my routes.rb: ActionController::Routing::Routes.draw do |map| map.resources :physicians map.resources :patients map.resources :inventory_items map.root :controller => ''inventory_items'' map.connect '':controller/:action/:id'' map.connect '':controller/:action/:id.:format'' end when I go to my root URI, I get the same old "Welcome aboard!" page. To make things even more weird, I can modify and/or delete the index.html page that is being displayed, with or without the map.root entry, and the *exact* same page is displayed anyway. I''ve even grepped every file in this application to make sure there is no other file with the word "Welcome" in it, and there isn''t. I''ve restarted apache every time I make a modificaiton to the routes.rb, just in case it''s caching some how. It looks like the only way I''ll be able to override the index of the root of the application is to rewrite the URI in the apache configuration, to change "/" to "/my_method/my_action". Anybody else have a problem like this? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jul-08 10:33 UTC
Re: map.root doesn''t do anything, index.html can''t be changed
> when I go to my root URI, I get the same old "Welcome aboard!" page. > > To make things even more weird, I can modify and/or delete the > index.html page that is being displayed, with or without the map.root > entry, and the *exact* same page is displayed anyway. I''ve even grepped > every file in this application to make sure there is no other file with > the word "Welcome" in it, and there isn''t.This sounds like you''re not modifying the files you think you are - clearly a file cannot be conjured out of thing air Fred> > I''ve restarted apache every time I make a modificaiton to the routes.rb, > just in case it''s caching some how. > > It looks like the only way I''ll be able to override the index of the > root of the application is to rewrite the URI in the apache > configuration, to change "/" to "/my_method/my_action". > > Anybody else have a problem like this? > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bobnation
2008-Jul-08 12:29 UTC
Re: map.root doesn''t do anything, index.html can''t be changed
Are you sure your browser hasn''t cached the page so that it comes up automatically. I''ve never had a problem like this one before. Also, and this is for everyone: do we need to specify an :action => when we''re mapping the root? On Jul 8, 4:19 am, Richard Pickett <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Environment: > > Apache/2.2.8 (Ubuntu) > DAV/2 > SVN/1.4.6 > PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch > mod_ruby/1.2.6 > Ruby/1.8.6(2007-09-24) > mod_ssl/2.2.8 > OpenSSL/0.9.8g > Phusion_Passenger/2.0.1 Server > > I''ve created several scaffolds that all work, and am trying to set the > root page for this app to default to one of the methods. Here''s my > routes.rb: > > ActionController::Routing::Routes.draw do |map| > map.resources :physicians > map.resources :patients > map.resources :inventory_items > map.root :controller => ''inventory_items'' > map.connect '':controller/:action/:id'' > map.connect '':controller/:action/:id.:format'' > end > > when I go to my root URI, I get the same old "Welcome aboard!" page. > > To make things even more weird, I can modify and/or delete the > index.html page that is being displayed, with or without the map.root > entry, and the *exact* same page is displayed anyway. I''ve even grepped > every file in this application to make sure there is no other file with > the word "Welcome" in it, and there isn''t. > > I''ve restarted apache every time I make a modificaiton to the routes.rb, > just in case it''s caching some how. > > It looks like the only way I''ll be able to override the index of the > root of the application is to rewrite the URI in the apache > configuration, to change "/" to "/my_method/my_action". > > Anybody else have a problem like this? > -- > 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Richard Pickett
2008-Jul-08 18:41 UTC
Re: map.root doesn''t do anything, index.html can''t be change
> This sounds like you''re not modifying the files you think you are - > clearly a file cannot be conjured out of thing air > > FredAnd so it was... (sigh) The directory in web directory was linking to the wrong app all along... I was thinking maybe it was something weird about the caching. grrrrr Four hours down the drain. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bobnation
2008-Jul-08 19:23 UTC
Re: map.root doesn''t do anything, index.html can''t be change
Despair not! Four hours lost now will mean never having to worry about the same problem again! On Jul 8, 1:41 pm, Richard Pickett <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > This sounds like you''re not modifying the files you think you are - > > clearly a file cannot be conjured out of thing air > > > Fred > > And so it was... (sigh) > > The directory in web directory was linking to the wrong app all along... > > I was thinking maybe it was something weird about the caching. > > grrrrr > > Four hours down the drain. > -- > 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---
Orion
2008-Jul-23 08:10 UTC
Re: map.root doesn''t do anything, index.html can''t be changed
You can delete the index.html under public folder, then this problem never happen again --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---