Jorge alejandro Mendoza torres
2010-Jun-18 19:39 UTC
Troubles with ActionController::DoubleRenderError
Hello all! I''m having troubles with my ruby application. When I click on the submit button, the browser shows me this: We''re sorry, but something went wrong. The production.log file has this text: -------------------------------------------------------------------------- Processing IdentificacionClienteController#parentesco_funcionario (for 189.169.176.192 at 2010-06-18 12:14:02) [POST] Parameters: {"expuesto"=>"no", "beneficiario"=>{"puesto"=>"", "parentesco"=>"", "nombre_expuesto"=>"", "app_recursos"=>""}, "guardar"=>"Terminar"} Redirected to https://www.mysite.com.mx/a/b ActionController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".): app/controllers/identificacion_cliente_controller.rb:157:in `parentesco_funcionario'' fcgi (0.8.8) lib/fcgi.rb:117:in `session'' fcgi (0.8.8) lib/fcgi.rb:104:in `each_request'' fcgi (0.8.8) lib/fcgi.rb:36:in `each'' dispatch.fcgi:24 Rendering /home/a/ruby/myApp/public/500.html (500 Internal Server Error) -------------------------------------------------------------------------- And the line that has the error is: redirect_to (:action => :imprime_req, :beneficiario => @beneficiario.id) I tried to fix it with this: redirect_to (:action => :imprime_req, :beneficiario => @beneficiario.id) and return But the application continues doing the same. If I do the same locally, using WampServer and NetBeans, the application works perfectly, but in the server doesn''t. Please, I hope and someone can help me. Thanks and regards -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.