# OpenID trhows action not found "show". Routes seems right

**URL:** <https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348>\
**Category:** Rails\
**Created:** [May 22, 2008, 7:13am UTC](https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348 "2008-05-22T07:13:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [May 22, 2008, 7:13am UTC](https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348/1 "2008-05-22T07:13:35Z")

</div>

Hi to everyone,

I’m trying to implement OpenID + restful authentication on my personal  
website.  
So far I’ve got to the point where I get redirected to the openid  
provider ([myopenid.com](http://myopenid.com)) to authorize my domain. Then when the provider  
redirects me back  
to my site, everything blows up with:

ctionController::UnknownAction (No action responded to show):  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:697:in  
`call_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform\_action\_without\_benchmark’  
/vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:68:in  
`perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform\_action\_without\_caching’  
/vendor/rails/actionpack/lib/action\_controller/caching.rb:678:in  
`perform_action' /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’  
/vendor/rails/activerecord/lib/active\_record/query\_cache.rb:8:in  
`cache' /vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform…

Now, in routes.rb I have:

map.root :controller =\> “welcome”

map.open\_id\_complete ‘session’, :controller =\> “sessions”, :action =\>  
“create”, :requirements =\> { :method =\> :get }  
map.resources :users  
map.resource :session

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

map.resources :albums, :has\_many =\> :photos  
map.resources :posts, :has\_many =\> :comments, :has\_one =\> :icon

map.home ‘home’, :controller =\> ‘home’, :action =\> ‘index’

map.connect ‘:controller/:action/:id’  
map.connect ‘:controller/:action/:id.:format’

Rails is 2.0.2, ruby-openid 2.0.4, and the latest  
open\_id\_authentication.

Googling around, everything seems to point the finger to routes.rb not  
being  
properly configured but, to me, it does seems right.  
I have even tried to use “:conditions” in place of “:requirements”,  
still no  
joy.

What’s that I’m doing wrong?

Thanks in advance for your help.  
Regards,  
Carmine

---

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [May 22, 2008, 11:46am UTC](https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348/2 "2008-05-22T11:46:02Z")

</div>

try adding:  
map.root :controller =\> “home”

Probably the authentication site is redirecting you to the root of  
your application, and you have to controller linked tobe the “root”  
controller for the site.

Rey9999

Carmine M. ha scritto:

---

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [May 22, 2008, 12:06pm UTC](https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348/3 "2008-05-22T12:06:40Z")

</div>

My bad… I didn’t see you already linked the root to ‘welcome’…  
Maybe the authentication site is redirecting you to the user page, and  
from what I remember, restful\_authentication does not include a show  
action when you generate the scaffold for the authenticated user (I  
can be wrong, though).

---

<div class="post-metadata">

**Author:** ![carminem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carminem](https://www.ruby-forum.com/u/carminem)\
**Post date:** [May 22, 2008, 12:31pm UTC](https://www.ruby-forum.com/t/openid-trhows-action-not-found-show-routes-seems-right/138348/4 "2008-05-22T12:31:25Z")

</div>

Rey9999 wrote:

> My bad… I didn’t see you already linked the root to ‘welcome’…  
> Maybe the authentication site is redirecting you to the user page, and  
> from what I remember, restful\_authentication does not include a show  
> action when you generate the scaffold for the authenticated user (I  
> can be wrong, though).

It’s ok 🙂  
I’m, slowly, finding the solution. I am using ExtJs to make the login  
form, and it works submitting via AJAX, this is not compatible with what  
the open\_id\_authentication plugin does.

It, infacts, redirects to the openid server page, which in turn triggers  
a failure on the AJAX request.

So the problem is not with the openid code, but with the AJAX request  
and the redirect.

Now it’s a matter of either finding a way to make ExtJs understand the  
redirect, or force ExtJs to submit the traditional way. If you have any  
advices, please help me 🙂

Thanks again for your support!
