# Controller/ URL not working without controller/index

**URL:** <https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864>\
**Category:** Rails\
**Created:** [April 30, 2009, 10:03am UTC](https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864 "2009-04-30T10:03:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 30, 2009, 10:03am UTC](https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864/1 "2009-04-30T10:03:50Z")

</div>

I’m following a book. It tells me to use: map.resource :controllername  
in routes

But, once I do that, for some reason my main controller/index doesn’t  
work if I don’t have “/index” behind it.

Anyone know why that would be? It just gives me:

Unknown action

No action responded to show. Actions: create, edit, index, and new

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 30, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/controller-url-not-working-without-controller-index/166864/2 "2009-04-30T16:49:42Z")

</div>

I think I figured it out.

I needed to have: map.resources :portfolios

NOT: map.resource :portfolios

(plural, not singular resources)
