What to do about the index.html file?

Hi,
I succesfully installed RoR and developed a small application. However,
when I remove the default index.html file, I get the following error at
the url: http://localhost:3000

Routing Error

Recognition failed for “/”

How could I get the default behavior for the root of the web site to
execute the index action of the index controller?

Thanks,

Ryan

You can create action for the index with something like below in you
controller:

def index
redirect_to :action => ‘list’
end

This will redirect to the list action.

You need to set up a route to redirect requests from
http://localhost:3000 to e.g.
http://localhost:3000/controller1/index.html

Read up on routes at Peak Obsession -
it’s pretty straightforward

Regards

Dave M.

I made the map.connect addition to my config/routes.rb file and that
works. Thanks for the help!

On 21-aug-2006, at 7:51, Mountain Drummer wrote:

Recognition failed for “/”

How could I get the default behavior for the root of the web site to
execute the index action of the index controller?

map.connect ‘’, :controller => “index”


Regards, Charles.

On 21-aug-2006, at 7:51, Mountain Drummer wrote:

Recognition failed for “/”

How could I get the default behavior for the root of the web site to
execute the index action of the index controller?

map.connect ‘’, :controller => “index”


Regards, Charles.