views:

109

answers:

4

map.root :controller => "main", :action => "index"

is not redirecting the main controller to home page to localhost:3000

any suggestions?

+4  A: 

Have you deleted index.html?

Andrei Serdeliuc
NO..I have not deleted index.html..It's working with localhost:3000/main..when I use map.root, its not redirecting..Thnx andrei...
sgi
If you don't delete `public/index.html` you'll never even get to the app (it wont look at your routes).
thenduks
thnx..its working now
sgi
+1  A: 

you must delete public/index.html

j.
A: 

down vote

Hi

I have a slightly different problem. I've set up a map.root entry and it works with mongrel. However when I use apache2 as the web server with Passenger module I get a '500' error. If I re-instate my /public/index.html then it works under apache2.

I have tried to go directly as:

http:///home/index

This also gives me the same '500' error.

Please can somebody tell me what I'm doing wrong?

Purvez
A: 

Hi

I found someone else who had had the same problem. Turns out that Passenger is running in production mode whilst my app was in development mode.

I put Passenger into development mode by adding the following line to my Virtual Hosts file

RailsEnv = development

Restarted Apache and it all works!!

Phew!

Purvez

Purvez