500 Internal Server Error when calling AJAX functions in Chrome
Added by Matthias Viranyi over 11 years ago
Hey guys!
I have an issue with Chrome and Redmine. Currently we moved a complete Redmine project from an external server to ours. Redmine itself runs well, but when doing something that involves Ajax I get a 500.
I also checked this on your site, works. So it is some hick up in our installation.
Server is a Apache, not sure yet which further information I may share with you. But here's the part of the log that might tell you what happend:
Processing IssuesController#show (for xxx.xxx.xxx.xxx at 2013-01-17 20:40:42) [GET] Session ID: 44221d531a7d6b98f9d7a7cd0accb8fc Parameters: {"action"=>"show", "id"=>"408", "controller"=>"issues"} Rendering template within layouts/base Rendering issues/show.rhtml Completed in 0.16277 (6 reqs/sec) | Rendering: 0.08980 (55%) | DB: 0.01002 (6%) | 200 OK [http://xxxxxxxxxxxxxxxxxxx/issues/show/408] /!\ FAILSAFE /!\ Thu Jan 17 20:40:49 +0100 2013 Status: 500 Internal Server Error can't modify frozen string /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:490:in `gsub!' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:490:in `clean_up_ajax_request_body!' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:400:in `parse_formatted_request_parameters' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/cgi_process.rb:80:in `request_parameters' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:307:in `parameters' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:22:in `request_method' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/request.rb:35:in `method' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/routing/route_set.rb:432:in `extract_request_environment' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/routing/route_set.rb:385:in `recognize' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:148:in `handle_request' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:107:in `dispatch' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `synchronize' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `dispatch' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi' /var/lib/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:35:in `dispatch' /var/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/apps/redmine/public/dispatch.cgi:10
Issue occurs in Chrome 24+ but not in FF18, nor IE8,9,..
I also found some information about the settings_controller.rb that there was some problem with Safari browsers. I checked that, but I'm again not shure what's happening:
@guessed_host_and_path = request.host_with_port.dup @guessed_host_and_path << ('/'+ request.relative_url_root.gsub(%r{^\/}, '')) unless request.relative_url_root.blank?
But according to the article it should be something like:
@guessed_host_and_path = '' @guessed_host_and_path += request.host_with_port
Any help like explanation what is happening there in general, hints to articles, related posts or direction to go from here I would appreciate.
RAILS_ENV says:
/var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:309:in `read': No such file or directory - /var/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/apps/redmine/config/environments/YOUR_ENVIRONMENT.rb (Errno::ENOENT) from /var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:309:in `load_environment' from /var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:302:in `load_environment' from /var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:121:in `process' from /var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `send' from /var/lib/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `run' from /var/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/apps/redmine/config/environment.rb:20 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/rails-2.1.2/lib/commands/about.rb:1 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/about:4
This doesn't seems to be good at all?!
Also I found this listing to be okay so far:
RAILS_ENV=production script/about
About your application's environment Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.3.7 Rails version 2.1.2 Active Record version 2.1.2 Action Pack version 2.1.2 Active Resource version 2.1.2 Action Mailer version 2.1.2 Active Support version 2.1.2 Application root /var/xxxxxxxxxxxxxxx/apps/redmine Environment production Database adapter mysql
Regards
Matthew