# Map.connect '' doesn't work

**URL:** <https://www.ruby-forum.com/t/map-connect-doesnt-work/165159>\
**Category:** Rails\
**Created:** [April 9, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159 "2009-04-09T17:36:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [April 9, 2009, 5:36pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159/1 "2009-04-09T17:36:50Z")

</div>

Hi, got a problem with the map.connect ‘’ in my website (I don’t know  
much of routes as I never really checked it).  
Ok so I just want to redirect automaticaly the users to my index page  
when they get to the site. So the idea is that using the address  
“[http://localhost:3000](http://localhost:3000)” using a route the user get to “http://  
localhost:3000/dentistManager”.

In my routes.rb I added:  
map.connect ‘’, :controller =\> ‘dentistmanager’, :action =\> “index”

So it looks like that:  
ActionController::Routing::Routes.draw do |map|  
map.resources :consultations

map.resources :patients

map.resources :doctors

map.resources :appointments

map.connect ‘’, :controller =\> ‘dentistmanager’, :action =\> “index”  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’  
end

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [April 9, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159/2 "2009-04-09T18:13:14Z")

</div>

> Ok so I just want to redirect automaticaly the users to my index page  
> when they get to the site. So the idea is that using the address  
> “[http://localhost:3000](http://localhost:3000)” using a route the user get to “http://  
> localhost:3000/dentistManager”.
> 
> In my routes.rb I added:  
> map.connect ‘’, :controller =\> ‘dentistmanager’, :action =\> “index”

Change to:

map.root :controller =\> ‘dentistmanager’, :action =\> “index”

Brandon

---

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [April 9, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159/3 "2009-04-09T18:39:36Z")

</div>

Hmmm, doesn’t work neither ☹

---

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [April 9, 2009, 6:47pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159/4 "2009-04-09T18:47:13Z")

</div>

what errors are you seeing? did you delete the index.html file in the  
public folder?

---

<div class="post-metadata">

**Author:** ![CiriusMex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90ced4/32.png) [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Post date:** [April 9, 2009, 6:51pm UTC](https://www.ruby-forum.com/t/map-connect-doesnt-work/165159/5 "2009-04-09T18:51:19Z")

</div>

Great, I deleted the index.html in the public folder and did the  
trick! Didn’t knew that one, thanks a lot to the both of you for the  
help ^^
