# Map.root doesn't work

**URL:** <https://www.ruby-forum.com/t/map-root-doesnt-work/152140>\
**Category:** Deployment\
**Created:** [October 30, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/map-root-doesnt-work/152140 "2008-10-30T14:25:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/map-root-doesnt-work/152140/1 "2008-10-30T14:25:50Z")

</div>

Hello,

I’ve been trying to set map.root for my site and it doesn’t seem to  
work!!

Here’s what I have in my routes.rb:

"  
ActionController::Routing::Routes.draw do |map|

map.root :controller =\> ‘leagues’, :action =\> ‘show’, :id =\> 1

map.logout ‘/logout’, :controller =\> ‘sessions’, :action =\> ‘destroy’  
map.login ‘/login’, :controller =\> ‘sessions’, :action =\> ‘new’

…  
"  
The map.root redirection doesn’t work.

When I write

map.r ‘/r’, :controller =\> ‘leagues’, :action =\> ‘show’, :id =\> 1

the direction works fine (localhost:3000/r).

Does anyone have a clue of what’s happening??

Thank.

---

<div class="post-metadata">

**Author:** ![thithi32](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b782af/32.png) [@thithi32](https://www.ruby-forum.com/u/thithi32)\
**Post date:** [October 30, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/map-root-doesnt-work/152140/2 "2008-10-30T16:19:49Z")

</div>

FOUND:

I had to delete the file: public/index.html

Now it works fine.
