Hi everyone, I am running essentially the stock AJAX demo from here, http://www.onlamp.com/lpt/a/5944 and it is working fine in every browser except one. Nope! Not that one! It''s actually Safari which is giving me trouble. I know! Using a link_to_remote call, for all other browsers places the sample text into the div after the text, but in Safari, the server is apparently returning a 500 Internal Server Error. All I can think of is that Safari is creating a malformed request ... have a look: http://www.mightywork.com/sandbox/toys/ajaxy Can anyone help me to explain this most bizarre behavior? If I do get my host involved (dreamhost), I would like to at lease know what to ask them to fix. Thanks in advance, Whit --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
More information: According to the log, a successful (Firefox) execution looks like this: ----------------------------- Processing ToysController#say_when (for ... at 2008-02-08 08:22:49) [POST] Session ID: ... Parameters: {"authenticity_token"=>"...", "action"=>"say_when", "controller"=>"toys"} Completed in 0.00408 (245 reqs/sec) | Rendering: 0.00008 (1%) | DB: 0.00000 (0%) | 200 OK [http://www.mightywork.com/sandbox/toys/ say_when] ----------------------------- But Safari''s request looks like this: ----------------------------- /!\ FAILSAFE /!\ Fri Feb 08 08:20:02 -0800 2008 Status: 500 Internal Server Error can''t modify frozen string /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:462:in `gsub!'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:462:in `clean_up_ajax_request_body!'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:380:in `parse_formatted_request_parameters'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ cgi_process.rb:78:in `request_parameters'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:287:in `parameters'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:22:in `request_method'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ request.rb:35:in `method'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ routing.rb:1483:in `extract_request_environment'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ routing.rb:1424:in `recognize'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:170:in `handle_request'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:115:in `dispatch'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:126:in `dispatch_cgi'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:9:in `dispatch'' dispatch.cgi:10 ----------------------------- On Feb 8, 11:02 am, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone, > > I am running essentially the stock AJAX demo from here, > > http://www.onlamp.com/lpt/a/5944 > > and it is working fine in every browser except one. Nope! Not that > one! It''s actually Safari which is giving me trouble. I know! Using a > link_to_remote call, for all other browsers places the sample text > into the div after the text, but in Safari, the server is apparently > returning a 500 Internal Server Error. > > All I can think of is that Safari is creating a malformed request ... > have a look: > > http://www.mightywork.com/sandbox/toys/ajaxy > > Can anyone help me to explain this most bizarre behavior? If I do get > my host involved (dreamhost), I would like to at lease know what to > ask them to fix. > > Thanks in advance, > > Whit--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am seeing this problem and I could reproduce this problem with FF, Opera and Safari from the Mac. It looks like a gem specific problem, Is there a patch or workaround ? -Arul On Feb 8, 9:18 am, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> More information: > > According to the log, a successful (Firefox) execution looks like > this: > > ----------------------------- > Processing ToysController#say_when (for ... at 2008-02-08 08:22:49) > [POST] > Session ID: ... > Parameters: {"authenticity_token"=>"...", "action"=>"say_when", > "controller"=>"toys"} > Completed in 0.00408 (245 reqs/sec) | Rendering: 0.00008 (1%) | DB: > 0.00000 (0%) | 200 OK [http://www.mightywork.com/sandbox/toys/ > say_when] > ----------------------------- > > But Safari''s request looks like this: > > ----------------------------- > /!\ FAILSAFE /!\ Fri Feb 08 08:20:02 -0800 2008 > Status: 500 Internal Server Error > can''t modify frozen string > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:462:in `gsub!'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:462:in `clean_up_ajax_request_body!'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:380:in `parse_formatted_request_parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > cgi_process.rb:78:in `request_parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:287:in `parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:22:in `request_method'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:35:in `method'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > routing.rb:1483:in `extract_request_environment'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > routing.rb:1424:in `recognize'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:170:in `handle_request'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:115:in `dispatch'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:126:in `dispatch_cgi'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:9:in `dispatch'' > dispatch.cgi:10 > ----------------------------- > > On Feb 8, 11:02 am, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi everyone, > > > I am running essentially the stock AJAX demo from here, > > >http://www.onlamp.com/lpt/a/5944 > > > and it is working fine in every browser except one. Nope! Not that > > one! It''s actually Safari which is giving me trouble. I know! Using a > > link_to_remote call, for all other browsers places the sample text > > into the div after the text, but in Safari, the server is apparently > > returning a 500 Internal Server Error. > > > All I can think of is that Safari is creating a malformed request ... > > have a look: > > >http://www.mightywork.com/sandbox/toys/ajaxy > > > Can anyone help me to explain this most bizarre behavior? If I do get > > my host involved (dreamhost), I would like to at lease know what to > > ask them to fix. > > > Thanks in advance, > > > Whit--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Interesting. I am seeing the same problem with my online deployment on a FastCGI server. However, my local mongrel does not have the problem at all. Very strange. This problem seems to be related to any Ajax.request. My in place editors don''t work. Same for autocompletion and all remote form tags. My hypothesis is that this is an interaction between ROR 2.0.2 and FastCGI. I saw a trouble ticket on the rails trac that matches up: http://dev.rubyonrails.org/ticket/10365 On Feb 8, 12:18 pm, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> More information: > > According to the log, a successful (Firefox) execution looks like > this: > > ----------------------------- > Processing ToysController#say_when (for ... at 2008-02-08 08:22:49) > [POST] > Session ID: ... > Parameters: {"authenticity_token"=>"...", "action"=>"say_when", > "controller"=>"toys"} > Completed in 0.00408 (245 reqs/sec) | Rendering: 0.00008 (1%) | DB: > 0.00000 (0%) | 200 OK [http://www.mightywork.com/sandbox/toys/ > say_when] > ----------------------------- > > But Safari''s request looks like this: > > ----------------------------- > /!\ FAILSAFE /!\ Fri Feb 08 08:20:02 -0800 2008 > Status: 500 Internal Server Error > can''t modify frozen string > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:462:in `gsub!'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:462:in `clean_up_ajax_request_body!'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:380:in `parse_formatted_request_parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > cgi_process.rb:78:in `request_parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:287:in `parameters'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:22:in `request_method'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > request.rb:35:in `method'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > routing.rb:1483:in `extract_request_environment'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > routing.rb:1424:in `recognize'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:170:in `handle_request'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:115:in `dispatch'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:126:in `dispatch_cgi'' > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > dispatcher.rb:9:in `dispatch'' > dispatch.cgi:10 > ----------------------------- > > On Feb 8, 11:02 am, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi everyone, > > > I am running essentially the stockAJAXdemo from here, > > >http://www.onlamp.com/lpt/a/5944 > > > and it is working fine in every browser except one. Nope! Not that > > one! It''s actually Safari which is giving me trouble. I know! Using a > > link_to_remote call, for all other browsers places the sample text > > into the div after the text, but in Safari, the server is apparently > > returning a 500 Internal Server Error. > > > All I can think of is that Safari is creating a malformed request ... > > have a look: > > >http://www.mightywork.com/sandbox/toys/ajaxy > > > Can anyone help me to explain this most bizarre behavior? If I do get > > my host involved (dreamhost), I would like to at lease know what to > > ask them to fix. > > > Thanks in advance, > > > Whit--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My initial gut feel on this has proved to be true. I migrated from FastCGI to Mongrel and all of my Ajax problems magically disappeared. I don''t know if it is a general FastCGI + Ajax problem, or if it is specifically how my service provider has FastCGI tuned out, but the exact same codebase works just fine on a Mongrel instance. -J On Feb 19, 9:54 pm, Jeremy Mayhew <jeremy.may...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Interesting. I am seeing the same problem with my online deployment > on a FastCGI server. However, my local mongrel does not have the > problem at all. Very strange. This problem seems to be related to > any Ajax.request. My in place editors don''t work. Same for > autocompletion and all remote form tags. > > My hypothesis is that this is an interaction between ROR 2.0.2 and > FastCGI. > > I saw a trouble ticket on the rails trac that matches up: > > http://dev.rubyonrails.org/ticket/10365 > > On Feb 8, 12:18 pm, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > More information: > > > According to the log, a successful (Firefox) execution looks like > > this: > > > ----------------------------- > > Processing ToysController#say_when (for ... at 2008-02-08 08:22:49) > > [POST] > > Session ID: ... > > Parameters: {"authenticity_token"=>"...", "action"=>"say_when", > > "controller"=>"toys"} > > Completed in 0.00408 (245 reqs/sec) | Rendering: 0.00008 (1%) | DB: > > 0.00000 (0%) | 200 OK [http://www.mightywork.com/sandbox/toys/ > > say_when] > > ----------------------------- > > > But Safari''s request looks like this: > > > ----------------------------- > > /!\ FAILSAFE /!\ Fri Feb 08 08:20:02 -0800 2008 > > Status: 500 Internal Server Error > > can''t modify frozen string > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:462:in `gsub!'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:462:in `clean_up_ajax_request_body!'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:380:in `parse_formatted_request_parameters'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > cgi_process.rb:78:in `request_parameters'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:287:in `parameters'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:22:in `request_method'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > request.rb:35:in `method'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > routing.rb:1483:in `extract_request_environment'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > routing.rb:1424:in `recognize'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > dispatcher.rb:170:in `handle_request'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > dispatcher.rb:115:in `dispatch'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > dispatcher.rb:126:in `dispatch_cgi'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ > > dispatcher.rb:9:in `dispatch'' > > dispatch.cgi:10 > > ----------------------------- > > > On Feb 8, 11:02 am, Whit Nelson <pengypeng...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi everyone, > > > > I am running essentially the stockAJAXdemo from here, > > > >http://www.onlamp.com/lpt/a/5944 > > > > and it is working fine in every browser except one. Nope! Not that > > > one! It''s actually Safari which is giving me trouble. I know! Using a > > > link_to_remote call, for all other browsers places the sample text > > > into the div after the text, but in Safari, the server is apparently > > > returning a 500 Internal Server Error. > > > > All I can think of is that Safari is creating a malformed request ... > > > have a look: > > > >http://www.mightywork.com/sandbox/toys/ajaxy > > > > Can anyone help me to explain this most bizarre behavior? If I do get > > > my host involved (dreamhost), I would like to at lease know what to > > > ask them to fix. > > > > Thanks in advance, > > > > Whit--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have the same problem... However, I cannot switch to Mongrel... Nauhaie -- 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 -~----------~----~----~----~------~----~------~--~---
Deirdre Saoirse Moen
2008-Apr-16 21:36 UTC
Re: RoR + AJAX + Safari = 500 Internal Server Error
Given that you seem to be alone in seeing this on all browsers, can I ask more about your configuration that you were running your app on? So far, everything else seems to indicate fcgi and not rails, and seems to be unique to the rails + fcgi + apache2 + Safari combination. On Feb 9, 1:08 pm, Arulchandran <itsil...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am seeing this problem and I could reproduce this problem with FF, > Opera and Safari > from the Mac. It looks like a gem specific problem, Is there a patch > or workaround ?-- _Deirdre http://deirdre.net/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
rails 2.0.2 + fcgi 0.8.7 + apache2 + safari/FF/Opera combination was working fine on my local Leopard (Mac OSX 10.5) machine. When I deployed the code to bluehost (rails 2.0.2 + fcgi 0.8.7 + apache2), I was having problems in remote_form_tag as mentioned in the below ticket, http://dev.rubyonrails.org/ticket/10365 I tried a workaround by changing the method as get for AjaxRequest and it works for now. But, still would like to find the root cause of this failure.. -Arul On Apr 16, 2:36 pm, "Deirdre Saoirse Moen" <dsm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Given that you seem to be alone in seeing this on all browsers, can I > ask more about your configuration that you were running your app on? > So far, everything else seems to indicate fcgi and not rails, and > seems to be unique to the rails + fcgi + apache2 + Safari combination. > > On Feb 9, 1:08 pm, Arulchandran <itsil...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am seeing this problem and I could reproduce this problem with FF, > > Opera and Safari > > from the Mac. It looks like a gem specific problem, Is there a patch > > or workaround ? > > -- > _Deirdrehttp://deirdre.net/--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Emanuele Tozzato
2008-Dec-15 07:21 UTC
Re: RoR + AJAX + Safari = 500 Internal Server Error
Hi, can you post your snippet? thx On Thu, Apr 17, 2008 at 10:42 AM, Arulchandran <itsilife-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I tried a workaround by changing the method as get for AjaxRequest and > it works for now. > But, still would like to find the root cause of this failure..--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---