-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentError: "+HH:MM" or "-HH:MM" expected for utc_offset #2310
Comments
Confirmed on jruby-1_7 and master: Time.now.getlocal(nil) 1.9+ compatibility |
jruby/jruby#2310. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Test added in http://mla.n-z.jp/~w3ml/w3ml.cgi/ruby-changes/msg/36771. |
Thank you! |
jruby/jruby#2310. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
I got a similar issue with JRuby 1.7.18:
On MRI everything works fine:
|
@mjansing This is showing the same error but it is a different issue (nil as argument was this issue and this must be something other than nil or a valid string). Can you open this as a fresh issue? You get bonus points if you can trace through I18n to the actual argument to the getlocal call... |
Curiousity got the better of me and I looked at MRI and then noticed we partially applied a fix to master. I commented on the issue you opened. Thanks @dalizard! |
@dalizard Thank you for digging into this issue. |
Updated to 1.7.18 but the problem when outputting dates is still there, in action view... ... org/jruby/RubyTime.java:443:in getlocal' activesupport (4.2.0) lib/active_support/time_with_zone.rb:79:in localtime'activesupport (4.2.0) lib/active_support/time_with_zone.rb:208:in strftime' activesupport (4.2.0) lib/active_support/time_with_zone.rb:197:in to_s'C:/jrails4_update/applications/assetsolutions/config/initializers/redefine_html_escape.rb:5:in html_escape' C:/jrails4_update/applications/assetsolutions/app/views/incidents/index.html.erb:50:in ____jrails__update_applications_assetsolutions_app_views_incidents_index_html_erb___1360065077_10940'org/jruby/RubyArray.java:1613:in each' C:0:in each'C:/jrails4_update/applications/assetsolutions/app/views/incidents/index.html.erb:44:in ____jrails__update_applications_assetsolutions_app_views_incidents_index_html_erb___1360065077_10940' actionview (4.2.0) lib/action_view/helpers/capture_helper.rb:38:in capture'actionview (4.2.0) lib/action_view/helpers/capture_helper.rb:200:in with_output_buffer' actionview (4.2.0) lib/action_view/helpers/capture_helper.rb:38:in capture'actionview (4.2.0) lib/action_view/helpers/form_tag_helper.rb:70:in form_tag' C:/jrails4_update/applications/assetsolutions/app/views/incidents/index.html.erb:4:in ____jrails__update_applications_assetsolutions_app_views_incidents_index_html_erb___1360065077_10940'actionview (4.2.0) lib/action_view/template.rb:145:in render' activesupport (4.2.0) lib/active_support/notifications.rb:166:in instrument'actionview (4.2.0) lib/action_view/template.rb:333:in instrument' actionview (4.2.0) lib/action_view/template.rb:143:in render'actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:54:in render_template' actionview (4.2.0) lib/action_view/renderer/abstract_renderer.rb:39:in instrument'activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument' activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in instrument'activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:19:in instrument' activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument'actionview (4.2.0) lib/action_view/renderer/abstract_renderer.rb:39:in instrument' actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:53:in render_template'actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:61:in render_with_layout' actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:52:in render_template'actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:14:in render' actionview (4.2.0) lib/action_view/renderer/renderer.rb:42:in render_template'actionview (4.2.0) lib/action_view/renderer/renderer.rb:23:in render' actionview (4.2.0) lib/action_view/rendering.rb:100:in _render_template'actionpack (4.2.0) lib/action_controller/metal/streaming.rb:217:in _render_template' actionview (4.2.0) lib/action_view/rendering.rb:83:in render_to_body'actionpack (4.2.0) lib/action_controller/metal/rendering.rb:32:in render_to_body' actionpack (4.2.0) lib/action_controller/metal/renderers.rb:37:in render_to_body'actionpack (4.2.0) lib/abstract_controller/rendering.rb:25:in render' actionpack (4.2.0) lib/action_controller/metal/rendering.rb:16:in render'actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:41:in render' activesupport (4.2.0) lib/active_support/core_ext/benchmark.rb:12:in ms'C:/jrails4_update/jruby/lib/ruby/1.9/benchmark.rb:295:in realtime' activesupport (4.2.0) lib/active_support/core_ext/benchmark.rb:12:in ms'actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:41:in render' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:84:in cleanup_view_runtime'activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:25:in cleanup_view_runtime' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:40:in render'actionpack (4.2.0) lib/action_controller/metal/mime_responds.rb:216:in respond_to' C:/jrails4_update/applications/assetsolutions/app/controllers/incidents_controller.rb:52:in index'actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (4.2.0) lib/abstract_controller/base.rb:198:in process_action'actionpack (4.2.0) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:20:in process_action'org/jruby/RubyProc.java:271:in call' activesupport (4.2.0) lib/active_support/callbacks.rb:117:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:234:in halting' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:219:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:169:in halting' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:169:in halting' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:151:in halting_and_conditional' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:738:in _run_process_action_callbacks'activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:in process_action'actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:in process_action'activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument' activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in instrument'activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:19:in instrument' activesupport (4.2.0) lib/active_support/notifications.rb:164:in instrument'actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in process_action'activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (4.2.0) lib/abstract_controller/base.rb:137:in process'actionview (4.2.0) lib/action_view/rendering.rb:30:in process' actionpack (4.2.0) lib/action_controller/metal.rb:195:in dispatch'actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in dispatch' actionpack (4.2.0) lib/action_controller/metal.rb:236:in action'org/jruby/RubyProc.java:271:in call' actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in dispatch'actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in serve' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in serve'org/jruby/RubyArray.java:1613:in each' actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in serve'actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in call' rack (1.6.0) lib/rack/etag.rb:24:in call'rack (1.6.0) lib/rack/conditionalget.rb:25:in call' rack (1.6.0) lib/rack/head.rb:13:in call'actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in call' actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in call'rack (1.6.0) lib/rack/session/abstract/id.rb:225:in context' rack (1.6.0) lib/rack/session/abstract/id.rb:220:in call'actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in call' activerecord (4.2.0) lib/active_record/query_cache.rb:36:in call'activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in call' activerecord (4.2.0) lib/active_record/migration.rb:378:in call'actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in call' org/jruby/RubyProc.java:271:in call'activesupport (4.2.0) lib/active_support/callbacks.rb:88:in _run_callbacks' activesupport (4.2.0) lib/active_support/callbacks.rb:738:in _run_call_callbacks'activesupport (4.2.0) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in call'actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in call' actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in call'actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in call' actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in call'railties (4.2.0) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.0) lib/rails/rack/logger.rb:20:in call'activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in tagged' activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in tagged'activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.0) lib/rails/rack/logger.rb:20:in call'actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.0) lib/rack/methodoverride.rb:22:in call'rack (1.6.0) lib/rack/runtime.rb:18:in call' activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call'rack (1.6.0) lib/rack/lock.rb:17:in call' actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in call'rack (1.6.0) lib/rack/sendfile.rb:113:in call' railties (4.2.0) lib/rails/engine.rb:518:in call'railties (4.2.0) lib/rails/application.rb:164:in call' rack (1.6.0) lib/rack/content_length.rb:15:in call'puma-2.10.2 (java) lib/puma/server.rb:492:in handle_request' puma-2.10.2 (java) lib/puma/server.rb:490:in handle_request'puma-2.10.2 (java) lib/puma/server.rb:363:in process_client' puma-2.10.2 (java) lib/puma/server.rb:359:in process_client'puma-2.10.2 (java) lib/puma/server.rb:254:in run' org/jruby/RubyProc.java:271:in call'puma-2.10.2 (java) lib/puma/thread_pool.rb:101:in `spawn_thread' Rendered C:/jrails4_update/jruby/lib/ruby/gems/shared/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.0ms) |
P.S. it's enough to add the line <%= Incident.first.created_at.to_s %> to raise the error... I have the db configured in utc... using oracle enhanced adapter 1.5.0 branch rails42 and ojdbc6.jar to access the db... config lines: config.active_record.default_timezone = :utc |
jruby/jruby#2310. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Hello!
I am not 100% if this needs to be handled by JRuby or ActiveSupport, but here is the problem.
The problem basically is coming from the fact that MRI handles
nil
cases of the passed utc_offset parameter, while JRuby does not. What do you think should be the proper behaviour here?The text was updated successfully, but these errors were encountered: