Bontina Chen
2007-Jan-15 10:05 UTC
ActionController::UnknownAction (No action responded to xxx)
I have a new method defined in a existing controller. All the methods I called in these are workable. But somehow the new method is not recognizable. ------------------new method I added-------------------------------------------- def push # if fair begin @product = Product.find(params[:id]) rescue logger.error("Attempt to access invalid product #{params[:id]}") flash[:notice] = " " redirect_to :action => :index else @list = List.new @list.add_line_item(@product,1) @list.name = 0 @list.user_id = session[:user_id] @list.created_at = Time.now @list.save redirect_to_index(" ") end # end end def unpush begin @product = Product.find(params[:id]) rescue logger.error("Attempt to access invalid product #{params[:id]}") flash[:notice] = " " redirect_to :action => :index else @list = List.new @list.add_line_item(@product,-1) @list.name = 0 @list.created_by = session[:user_id] @list.created_at = Time.now if @list.save puts ''success'' end redirect_to_index(" ") end end ---------------Below are what I dig out from development log------------- Processing AdminController#push (for 218.168.71.156 at 2007-01-15 17:57:04) [POST] Session ID: 00fb54a082d338ea3f865630769d1a1d Parameters: {"commit"=>"\346\216\250", "action"=>"push", "id"=>"27", "controller"=>"admin"} [4;36;1mUser Columns (0.016000) [0m [0;1mSHOW FIELDS FROM users [0m [4;35;1mUser Load (0.000000) [0m [0mSELECT * FROM users WHERE (users.`id` = 1 ) LIMIT 1 [0m ActionController::UnknownAction (No action responded to push): C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' C:/INSTAN~1/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/rails.rb:73:in `process'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:551:in `process_client'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:550:in `each'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:550:in `process_client'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `initialize'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `new'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `initialize'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `new'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:956:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:955:in `each'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:955:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:127:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/command.rb:199:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:235 C:/INSTAN~1/ruby/bin/mongrel_rails:18:in `load'' C:/INSTAN~1/ruby/bin/mongrel_rails:18 Rendering C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) ---------------------------END of CODE----------------------------------------- Thanks in advance. -- 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 -~----------~----~----~----~------~----~------~--~---
Andrew Skegg
2007-Jan-16 00:04 UTC
Re: ActionController::UnknownAction (No action responded to
You may find that the Controller already has a method called "push" as it is part of the Ruby language. Comment out the method and get your application to drop in a breakpointer - this will allow you to list the methods already available using "methods.sort" on the Controller. -- 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 -~----------~----~----~----~------~----~------~--~---
Bontina Chen
2007-Jan-16 01:58 UTC
Re: ActionController::UnknownAction (No action responded to
Andrew Skegg wrote:> You may find that the Controller already has a method called "push" as > it is part of the Ruby language. Comment out the method and get your > application to drop in a breakpointer - this will allow you to list the > methods already available using "methods.sort" on the Controller.Thanks a lot for the advice.I checked and found out push is aleady taken. So I rename the actions to arouse. But still, it''s an unknown action. I guess it may be another problem... -- 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 -~----------~----~----~----~------~----~------~--~---
Bontina Chen
2007-Jan-16 04:43 UTC
Re: ActionController::UnknownAction (No action responded to
Bontina Chen wrote:> Andrew Skegg wrote: >> You may find that the Controller already has a method called "push" as >> it is part of the Ruby language. Comment out the method and get your >> application to drop in a breakpointer - this will allow you to list the >> methods already available using "methods.sort" on the Controller. > > Thanks a lot for the advice.I checked and found out push is aleady > taken. So I rename the actions to arouse. But still, it''s an unknown > action. I guess it may be another problem...The new error log is as follows Processing AdminController#arouse (for 218.167.96.38 at 2007-01-16 12:19:13) [POST] Session ID: 489934e0a12acfd02af74c3a930a9e9f Parameters: {"commit"=>"\346\216\250", "action"=>"arouse", "id"=>"27", "controller"=>"admin"} [4;35;1mUser Columns (0.000000) [0m [0mSHOW FIELDS FROM users [0m [4;36;1mUser Load (0.000000) [0m [0;1mSELECT * FROM users WHERE (users.`id` = 1 ) LIMIT 1 [0m ActionController::UnknownAction (No action responded to arouse): C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' C:/INSTAN~1/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/rescue.rb:82:in `perform_action'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `process_without_filters'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/session_management.rb:117:in `process'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/rails.rb:73:in `process'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:551:in `process_client'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:550:in `each'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:550:in `process_client'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `initialize'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `new'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:636:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `initialize'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `new'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:625:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:956:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:955:in `each'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel.rb:955:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:127:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/lib/mongrel/command.rb:199:in `run'' C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.3-mswin32/bin/mongrel_rails:235 C:/INSTAN~1/ruby/bin/mongrel_rails:18:in `load'' C:/INSTAN~1/ruby/bin/mongrel_rails:18 Rendering C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) -- 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 -~----------~----~----~----~------~----~------~--~---
Swaraj Shergill
2007-Jan-16 04:45 UTC
Re: ActionController::UnknownAction (No action responded to
Rendering C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) Are you expecting this error ?? -- 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 -~----------~----~----~----~------~----~------~--~---
Bontina Chen
2007-Jan-16 04:49 UTC
Re: ActionController::UnknownAction (No action responded to
Swaraj Shergill wrote:> Rendering > C:/INSTAN~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/templates/rescues/layout.rhtml > (404 Page Not Found) > > Are you expecting this error ??Actually I don''t know where it''s from. -- 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 -~----------~----~----~----~------~----~------~--~---