Error 500

Added by David Siegfried over 8 years ago

The problem is when I click on new activity or issue, I get an error 500.

In the log I see this:

Processing IssuesController#new (for 93.181.44.180 at 2012-04-19 20:38:26) [GET]
  Parameters: {"controller"=>"issues", "action"=>"new", "project_id"=>"pandemie"}
Rendering template within layouts/base
Rendering issues/new

ActionView::TemplateError (incompatible character encodings: ASCII-8BIT and UTF-8) on line #44 of app/views/issues/_form.html.erb:
41: <% end %>
42: 
43: <div id="attributes" class="attributes">
44:   <%= render :partial => 'issues/attributes' %>
45: </div>
46: 
47: <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>

    app/views/issues/_form.html.erb:44:in `concat'
    app/views/issues/_form.html.erb:44:in `block in _run_erb_app47views47issues47_form46html46erb_locals_f_form_object'
    app/helpers/application_helper.rb:941:in `labelled_fields_for'
    app/views/issues/_form.html.erb:1
    app/views/issues/new.html.erb:11:in `block in _run_erb_app47views47issues47new46html46erb'
    app/helpers/application_helper.rb:934:in `labelled_form_for'
    app/views/issues/new.html.erb:5
    app/controllers/issues_controller.rb:130:in `block (2 levels) in new'
    app/controllers/issues_controller.rb:129:in `new'
    <internal:prelude>:10:in `synchronize'
    passenger (3.0.12) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.12) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
    passenger (3.0.12) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.12) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
    passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
    passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
    <internal:prelude>:10:in `synchronize'
    passenger (3.0.12) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.12) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.12) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.12) helper-scripts/passenger-spawn-server:99:in `<main>'

Rendering /disk/duemmer/mirr0/proj/sp12/sp12gi/redmine-1.4/public/500.html (500 Internal Server Error)

Processing ActivitiesController#index (for 93.181.44.180 at 2012-04-19 20:39:10) [GET]
  Parameters: {"controller"=>"activities", "action"=>"index", "id"=>"pandemie"}
Completed in 18ms (View: 0, DB: 3) | 304 Not Modified [http://duemmer.informatik.uni-oldenburg.de/redmine/projects/pandemie/activity]


Please help me, it is softwareproject and it is the first time, that i work with ruby and redmine.

Thanks a lot.

Replies (5)

RE: Error 500 - Added by Hyunchul Nah over 8 years ago

I have a similar problem, but I see that nobody has answered this.
In my case, when an user with language setting "Korean" fails to login
with Error 500 and the log looks like:

Processing AccountController#login (for 10.145.201.190 at 2012-06-15 13:06:58) [POST]
  Parameters: {"authenticity_token"=>"HIXVL0G1ziLe4Z5tt9ydf7hl/lYWhGZFwlWM+C+Z9ak=", "back_url"=>"http%3A%2F%2F10.145.201.190%2Fredmine%2F", "username"=>"woods", "password"=>"[FILTERED]", "login"=>"Login »", "controller"=>"account", "action"=>"login"}
Redirected to http://10.145.201.190/redmine/
Completed in 468ms (DB: 143) | 302 Found [http://10.145.201.190/redmine/login]

Processing WelcomeController#index (for 10.145.201.190 at 2012-06-15 13:06:58) [GET]
  Parameters: {"controller"=>"welcome", "action"=>"index"}
Rendering template within layouts/base
Rendering welcome/index

ActionView::TemplateError (incompatible character encodings: UTF-8 and ASCII-8BIT) on line #23 of app/views/welcome/index.html.erb:
20:     <% for project in @projects %>
21:       <% @project = project %>
22:       <li>
23:       <%= link_to_project project %> (<%= format_time(project.created_on) %>)
24:       <%= textilizable project.short_description, :project => project %>
25:       </li>
26:     <% end %>

    app/views/welcome/index.html.erb:23:in `concat'
    app/views/welcome/index.html.erb:23:in `block in _run_erb_app47views47welcome47index46html46erb'
    app/views/welcome/index.html.erb:20:in `each'
    app/views/welcome/index.html.erb:20
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:34:in `block in render'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:306:in `with_template'
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:30:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/template.rb:205:in `render_template'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:265:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:348:in `_render_with_layout'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:262:in `render'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1252:in `render_for_file'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:936:in `render'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:51:in `block in render_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:51:in `render_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1328:in `default_render'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1334:in `perform_action'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:638:in `block in run_before_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:189:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:189:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:635:in `run_before_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:615:in `call_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_with_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_with_rescue'
    /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action_with_flash'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process_with_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `block in call'
    /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
    /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
    /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
    /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
    /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:479:in `safe_fork'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:180:in `start'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
    <internal:prelude>:10:in `synchronize'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99:in `<main>'

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

Users with "English" language can be logged without problems, but when choosing
projects with Korean character, the same error ocurred:

Processing ProjectsController#index (for 10.145.201.190 at 2012-06-15 13:07:31) [GET]
  Parameters: {"controller"=>"projects", "action"=>"index"}
Rendering template within layouts/base
Rendering projects/index
Completed in 28ms (View: 20, DB: 1) | 200 OK [http://10.145.201.190/redmine/projects]

Processing ProjectsController#show (for 10.145.201.190 at 2012-06-15 13:07:33) [GET]
  Parameters: {"controller"=>"projects", "action"=>"show", "id"=>"displayprocess"}
Rendering template within layouts/base
Rendering projects/show

ActionView::TemplateError (incompatible character encodings: ASCII-8BIT and UTF-8) on line #56 of app/views/projects/show.html.erb:
53: </div>
54: 
55: <div class="splitcontentright">
56:   <%= render :partial => 'members_box' %>
57: 
58:   <% if @news.any? && authorize_for('news', 'index') %>
59:   <div class="news box">

    app/views/projects/show.html.erb:56:in `concat'
    app/views/projects/show.html.erb:56
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:34:in `block in render'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:306:in `with_template'
    /usr/lib/ruby/vendor_ruby/action_view/renderable.rb:30:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/template.rb:205:in `render_template'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:265:in `render'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:348:in `_render_with_layout'
    /usr/lib/ruby/vendor_ruby/action_view/base.rb:262:in `render'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1252:in `render_for_file'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:942:in `render'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:51:in `block in render_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:51:in `render_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:135:in `block in custom'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:179:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:179:in `block in respond'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:173:in `each'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:173:in `respond'
    /usr/lib/ruby/vendor_ruby/action_controller/mime_responds.rb:107:in `respond_to'
    app/controllers/projects_controller.rb:168:in `show'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_with_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_with_rescue'
    /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action_with_flash'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process'
    /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process_with_filters'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
    /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `block in call'
    /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
    /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
    /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
    /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
    /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
    /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
    /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:479:in `safe_fork'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:180:in `start'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
    <internal:prelude>:10:in `synchronize'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99:in `<main>'

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

Any clues or advices would be appreciated.

Thank you in advance.

RE: Error 500 - Added by David Siegfried over 8 years ago

Hi, my solution for this issue was to change the encoding for database (from Latin1 to UTF8). I don't if the korean language ist supported by UTF8.

RE: Error 500 - Added by Hyunchul Nah over 8 years ago

Thank you for your reply, but my database (mysql) encoding is already UTF8.

+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
| collation_connection     | utf8_general_ci            |
| collation_database       | utf8_general_ci            |
| collation_server         | utf8_unicode_ci            |
| completion_type          | 0                          |
| concurrent_insert        | 1                          |
| connect_timeout          | 10                         |
+--------------------------+----------------------------+

In fact, this error occurs after the software upgrade and there was no problems before that upgrade.

Unfortunately, I cannot point out which is responsible for. The upgrade was done with "aptitude -y safe-upgrade" in Debian system and I have no informations about the upgraded packages in detail.

RE: Error 500 - Added by David Siegfried over 8 years ago

Hi, i read in several threas with similar problems by upgrading the system. Try to reinstall the newest redmine version.

The next thing is, you have three diffrent uft8 encoding versions in your database. Try to set all tables to utf8_general_ci.

RE: Error 500 - Added by Daniel Caro about 8 years ago

Change:
- Change GemFile the mysql => mysql2
- Change the adapter in database.yml to mysql2
- Add to config/environment.rb
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8

It's works for me ... Using
Redmine 1.4.3
Ruby 1.9.3
Passenger 3

Good Luck!

(1-5/5)