# No route matches "/home/index" with {:method=\>:get}

**URL:** <https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852>\
**Category:** Rails\
**Created:** [April 17, 2011, 8:47am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852 "2011-04-17T08:47:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 17, 2011, 8:47am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/1 "2011-04-17T08:47:48Z")

</div>

I followed a tutorial to learn ruby on rails at  
[http://guides.rubyonrails.org/v2.3.8/getting\_started.html](http://guides.rubyonrails.org/v2.3.8/getting_started.html)  
After creating a view and controller as “script/generate controller  
home index” and then i changed the contents of app/view/home/  
index.html.erb file according to tutorial into one line as

# Hello, Rails!

```
                 Now i started the server as script/

```

server(successfully started) and when i navigate to localhost:3000/  
home/index, i got a error message which says

ROUTING ERROR  
No route matches “/home/index” with {:method=\>:get}

Please someone help to resolve.

Thanks

---

<div class="post-metadata">

**Author:** ![amritpal\_p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@amritpal\_p](https://www.ruby-forum.com/u/amritpal_p)\
**Post date:** [April 17, 2011, 9:00am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/2 "2011-04-17T09:00:45Z")

</div>

On Sun, Apr 17, 2011 at 6:46 AM, amrit pal pathak  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> wrote:

> ROUTING ERROR  
> No route matches “/home/index” with {:method=\>:get}
> 
> Remove the /public/index.html file in your app directory.  
> Check to see if you have a route for root in your routes.rb file.  
> If not, make it  
> _map.root :controller =\> “home”_  
> If you still have problems, post the contents of your routes file.

---

<div class="post-metadata">

**Author:** ![amritpal\_p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@amritpal\_p](https://www.ruby-forum.com/u/amritpal_p)\
**Post date:** [April 17, 2011, 10:04am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/3 "2011-04-17T10:04:15Z")

</div>

Also verify that you are _actually_ using Rails 2.3.8. Very basic  
check, I  
know, but routing syntax is different in Rails 3, and I don’t believe  
older  
syntax is supported.

---

<div class="post-metadata">

**Author:** ![amritpal\_p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@amritpal\_p](https://www.ruby-forum.com/u/amritpal_p)\
**Post date:** [April 17, 2011, 11:29am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/4 "2011-04-17T11:29:58Z")

</div>

On Apr 17, 2:59am, Jatin kumar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > wrote:
> 
> > ROUTING ERROR  
> > No route matches “/home/index” with {:method=\>:get}
> 
> > Remove the /public/index.html file in your app directory.
> 
> Check to see if you have a route for root in your routes.rb file.  
> If not, make it  
> _map.root :controller =\> “home”_  
> If you still have problems, post the contents of your routes file.  
> I added the _map.root :controller =\> “home”_ at the bottom of  
> router.rb file and it worked.so i could accessed now "localhost:3000/  
> home/index

```
 Please explain how it (*map.root :controller => "home"*) is

```

working (means which part calls to which).

Thanks

---

<div class="post-metadata">

**Author:** ![amritpal\_p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@amritpal\_p](https://www.ruby-forum.com/u/amritpal_p)\
**Post date:** [April 17, 2011, 11:29am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/5 "2011-04-17T11:29:58Z")

</div>

On Apr 17, 4:01am, Chris K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Also verify that you are _actually_ using Rails 2.3.8. Very basic check, I  
> know, but routing syntax is different in Rails 3, and I don’t believe older  
> syntax is supported.

```
  I am running rails 2.3.5 and this format worked for me.

```

Thanks

---

<div class="post-metadata">

**Author:** ![amritpal\_p](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71c47a/32.png) [@amritpal\_p](https://www.ruby-forum.com/u/amritpal_p)\
**Post date:** [April 17, 2011, 11:57am UTC](https://www.ruby-forum.com/t/no-route-matches-home-index-with-method-get/205852/6 "2011-04-17T11:57:44Z")

</div>

On Sun, Apr 17, 2011 at 9:28 AM, amrit pal pathak  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> wrote:

> > If not, make it  
> > _map.root :controller =\> “home”_  
> > If you still have problems, post the contents of your routes file.  
> > I added the _map.root :controller =\> “home”_ at the bottom of  
> > router.rb file and it worked.so i could accessed now "localhost:3000/  
> > home/index
> 
> ```
> Please explain how it (*map.root :controller => "home"*) is
> 
> ```
> 
> working (means which part calls to which).
> 
> Go through the rails getting started guides if you run into issues like  
> these again. Google it. The first link will get you there.  
> As far as the above is concerned, map.root tells the route for the root  
> i.e.  
> localhost:3000 in development or [www.domain.com](http://www.domain.com) in production.
