Carmine Moleti
2008-May-22 05:13 UTC
OpenID trhows action not found "show". Routes seems right.
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) 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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Rey9999
2008-May-22 09:45 UTC
Re: OpenID trhows action not found "show". Routes seems right.
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 Moleti ha scritto:> 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) 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 > -- > Posted via http://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rey9999
2008-May-22 10:05 UTC
Re: OpenID trhows action not found "show". Routes seems right.
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). On 22 Mag, 11:45, Rey9999 <reyfourn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 Moleti ha scritto: > > > 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) 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 > > -- > >Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Carmine Moleti
2008-May-22 10:31 UTC
Re: OpenID trhows action not found "show". Routes seems righ
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! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---