Open Siddius opened 10 years ago
I can confirm this one for 4.0 beta 1 release. My environment is: tomcat 7 on ubuntu 12.04, system locale is ru_RU.UTF-8, mysql db encoding is utf8. Steps to reproduce:
I had to downgrade to 984b3a94 commit - it fixes some early bugs and still works on ruby-1.9.3 (failed to make jobsworth work on jruby-1.7.4 + phusion passenger + apache).
Vikrant, do we have some non UTF templates still?
Everything is UTF-8 by default in the application (and in database if properly configured). This is probably something more complicated. I'm working on reproducing this and then I may have more to say about this.
Given that the Hungarians translated the whole app successfully, I think we should focus on merging their changes. Perhaps that will fix the problem. I see in the fork tree that Juan created some merges for this code.
Ignore that last bit about @juan-hawa since I can see he hasn't prepared a pull request. But still, we can do that work soon to merge in the Hungarian i18n improvements.
There is an problem with using special characters. If you use a task name like "öäü" you get the error msg. sometimes, not always. After that jobsworth isnt working at all. After waiting a few hours everthing works fine again, and you are also able to edit the task, and all characters are shown right.
i am using Ubuntu with tomcat6 and the WAR file, utf8 unicode is set in mysql database, tables and connection. This problem hast been discussed here: https://groups.google.com/forum/#!topic/jobsworth/0Wx1ORi-C8o
ActionView::Template::Error occurred in tasks#index:
incompatible character encodings: UTF-8 and ASCII-8BIT org/jruby/RubyString.java:2611:in `concat'
Request:
Session:
<ActionDispatch::Flash::FlashHash:0x1f8a73d7
@closed=false, @flashes= {:success=> "#2 <a href=\"http://#####/tasks/2\" class=\"tasklink \">Lizenzen abkl\xC3\xA4ren - Task successfully created."}, @now=nil, @used=#<Set: {:success}>>}
Environment:
: Apache Tomcat/6.0.35
: 1.1.13.2
Backtrace:
org/jruby/RubyString.java:2611:in
concat' gems/gems/activesupport-3.2.13/lib/active_support/core_ext/string/output_safety.rb:133:in
concat' gems/gems/actionpack-3.2.13/lib/action_view/buffers.rb:11:in<<' app/views/layouts/_flash.html.erb:4:in
_app_views_layoutsflash_html_erb1880235414_17144' org/jruby/RubyHash.java:1257:ineach' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:136:in
each' app/views/layouts/_flash.html.erb:1:in_app_views_layouts__flash_html_erb__1880235414_17144' org/jruby/RubyBasicObject.java:1689:in
send' org/jruby/RubyKernel.java:2111:insend' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in
render' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:125:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:265:inrender_partial' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:238:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:19:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in
instrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:237:inrender' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:41:in
render_partial' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:15:inrender' gems/gems/actionpack-3.2.13/lib/action_view/helpers/rendering_helper.rb:24:in
render' app/views/layouts/_notice.html.erb:1:in_app_views_layouts__notice_html_erb___1759524450_17140' org/jruby/RubyBasicObject.java:1689:in
send' org/jruby/RubyKernel.java:2111:insend' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in
render' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:125:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:265:inrender_partial' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:238:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:19:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in
instrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/partial_renderer.rb:237:inrender' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:41:in
render_partial' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:15:inrender' gems/gems/actionpack-3.2.13/lib/action_view/helpers/rendering_helper.rb:24:in
render' app/views/layouts/basic.html.erb:34:in_app_views_layouts_basic_html_erb___737963601_16920' org/jruby/RubyBasicObject.java:1689:in
send' org/jruby/RubyKernel.java:2111:insend' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in
render' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:125:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:47:inrender_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:19:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in
instrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:46:in
render_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:54:inrender_with_layout' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:45:in
render_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:18:inrender' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:36:in
render_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:17:inrender' gems/gems/actionpack-3.2.13/lib/action_view/helpers/rendering_helper.rb:24:in
render' app/views/layouts/application.html.erb:15:in_app_views_layouts_application_html_erb___1717954070_16822' org/jruby/RubyBasicObject.java:1689:in
send' org/jruby/RubyKernel.java:2111:insend' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in
render' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:125:ininstrument' gems/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in
render' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:59:inrender_with_layout' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:45:in
render_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:18:inrender' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:36:in
render_template' gems/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:17:inrender' gems/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:110:in
_render_template' gems/gems/actionpack-3.2.13/lib/action_controller/metal/streaming.rb:225:in_render_template' gems/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:103:in
render_to_body' gems/gems/actionpack-3.2.13/lib/action_controller/metal/renderers.rb:28:inrender_to_body' gems/gems/actionpack-3.2.13/lib/action_controller/metal/compatibility.rb:50:in
render_to_body' gems/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:88:inrender' gems/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:16:in
render' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:inrender' gems/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:in
ms' jar:file:lib/gems-gems-jruby-jars-1.7.3-lib-jruby-stdlib-1.7.3.jar!/META-INF/jruby.home/lib/ruby/1.9/benchmark.rb:295:inrealtime' gems/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:in
ms' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:inrender' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:83:in
cleanup_view_runtime' gems/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:24:incleanup_view_runtime' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:39:in
render' gems/gems/remotipart-1.0.5/lib/remotipart/render_overrides.rb:14:inrender_with_remotipart' gems/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:10:in
default_render' gems/gems/actionpack-3.2.13/lib/action_controller/metal/mime_responds.rb:196:inrespond_to' app/controllers/tasks_controller.rb:18:in
index' org/jruby/RubyBasicObject.java:1677:in__send__' org/jruby/RubyKernel.java:2103:in
send' gems/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:insend_action' gems/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:in
process_action' gems/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:inprocess_action' gems/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:in
process_action' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:450:in_run__120939935__process_action__1375380497__callbacks' org/jruby/RubyBasicObject.java:1677:in
send' org/jruby/RubyKernel.java:2103:insend' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
run_callback' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:390:in_run_process_action_callbacks' org/jruby/RubyBasicObject.java:1683:in
__send' org/jruby/RubyKernel.java:2107:insend' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in
run_callbacks' gems/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:inprocess_action' gems/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in
process_action' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:inprocess_action' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:ininstrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:19:in
instrument' gems/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' gems/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in
process_action' gems/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' gems/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in
process_action' gems/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:inprocess' gems/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in
process' gems/gems/actionpack-3.2.13/lib/action_controller/metal.rb:203:indispatch' gems/gems/actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' gems/gems/actionpack-3.2.13/lib/action_controller/metal.rb:246:inaction' org/jruby/RubyProc.java:249:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:indispatch' gems/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in
call' gems/gems/journey-1.0.4/lib/journey/router.rb:68:incall' org/jruby/RubyArray.java:1613:in
each' gems/gems/journey-1.0.4/lib/journey/router.rb:56:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in
call' gems/gems/exception_notification-2.6.1/lib/exception_notifier.rb:34:incall' gems/gems/warden-1.2.1/lib/warden/manager.rb:35:in
call' org/jruby/RubyKernel.java:1174:incatch' gems/gems/warden-1.2.1/lib/warden/manager.rb:34:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:incall' gems/gems/rack-1.4.5/lib/rack/etag.rb:23:in
call' gems/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in
call' gems/gems/remotipart-1.0.5/lib/remotipart/middleware.rb:30:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:incall' gems/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in
context' gems/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in
call' gems/gems/activerecord-3.2.13/lib/active_record/query_cache.rb:64:incall' gems/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:incall' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:408:in
_run1721873687call1900997266callbacks' org/jruby/RubyBasicObject.java:1677:in__send__' org/jruby/RubyKernel.java:2103:in
send' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in**run_callback' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:390:in
_run_call_callbacks' org/jruby/RubyBasicObject.java:1677:in__send**' org/jruby/RubyKernel.java:2103:in
send' gems/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:incall' gems/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in
call_app' gems/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:incall' gems/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in
tagged' gems/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in
call' gems/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:incall' gems/gems/rack-1.4.5/lib/rack/runtime.rb:17:in
call' gems/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:incall' gems/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in
call' gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:inforward' gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in
fetch' gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:inlookup' gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in
call!' gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:incall' gems/gems/railties-3.2.13/lib/rails/engine.rb:479:in
call' gems/gems/railties-3.2.13/lib/rails/application.rb:223:incall' file:lib/gems-gems-jruby-rack-1.1.13.2-lib-jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in
call'