Alex Rivera | Logout

Ruby on Rails map.root doesn't seem to be working

Asked 2009-07-30T07:44:46.617
9

I am trying to get the root of my application to route to a default controller. From what I read, this should be possible with something like this at the bottom of my routes.rb file:

map.root :controller => 'albums'

or perhaps even:

map.home  '', :controller => 'albums'

However, when I try navigating to http://myhost:8000/, I just see the rails welcome page. I am restarting the application with the following command after making the change to routes.rb and before testing it:

sudo mongrel_cluster_ctl restart

Here is some more possibly pertinent environment information:

% rails -v
Rails 2.3.3

% ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

I am sure I'm missing something simple, but I can't see what it is. Any ideas?

Edit
Report

1 Answer

15

Have you deleted the static public/index.html page that Rails creates? If this is still in your app it will be shown instead of the root page you defined in the routes.

answered 2009-07-30T08:01:42.900

Your Answer