# Unknown action No action responded to 2. Actions: show

**URL:** <https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-2-actions-show/190481>\
**Category:** Rails\
**Created:** [June 21, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-2-actions-show/190481 "2010-06-21T12:13:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 12:13pm UTC](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-2-actions-show/190481/1 "2010-06-21T12:13:38Z")

</div>

I’m trying to create a simple RoR application that shows me the records  
inside my table, provided that it is an example I’m working on the “Head  
First Rails” book.

When I try to retrieve the record I get the following message:

"Unknown action

No action responded to 2. Actions: show"

Why am I having that? And, how can I fix this issue?

Provided that:

1- I have inserted one record in the SQLite3 database in the table  
“ads”.  
2- route.rb

ActionController::Routing::Routes.draw do |map|  
map.connect ‘/ads/id’, :controller=\>‘ads’, :action=\>‘show’  
map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’  
end

2- ads\_controller.rb

class AdsController \< ApplicationController  
def show  
@ad = Ad.find(params[:id])  
end  
end

3- show.html.erb

 \<%= @ad.name %\>

**Name:** \<%= @ad. name %\>

**Description:** \<%= @ad. description %\>

**Price:** \<%= @ad. price %\>

**Seller Id:** \<%= @ad. seller\_id %\>

**Email:** \<%= @ad. email %\>

![]()

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 12:56pm UTC](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-2-actions-show/190481/2 "2010-06-21T12:56:50Z")

</div>

The issue was that I forgot to insert the colon before id -\> :id

map.connect ‘/ads/id’, :controller=\>‘ads’, :action=\>‘show’

Thanks.

---

<div class="post-metadata">

**Author:** ![swengineer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Post date:** [June 21, 2010, 1:16pm UTC](https://www.ruby-forum.com/t/unknown-action-no-action-responded-to-2-actions-show/190481/3 "2010-06-21T13:16:42Z")

</div>

The issue was that I forgot to insert the colon before id -\> :id

map.connect ‘/ads/id’, :controller=\>‘ads’, :action=\>‘show’

Thanks.
