Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 237
pkaeding Avatar asked Jul 30 '09 07:07

pkaeding


1 Answers

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.

like image 139
Eifion Avatar answered Oct 12 '22 22:10

Eifion