Project

General

Profile

Actions

Defect #10442

closed

Ruby 1.9.3 Time Zone setting Internal error.

Added by Jun NAITOH about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Ruby support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I tested on Redmine trunk r9237.

  • CentOS 6 x86
  • Ruby 1.9.3p125
  • Rails 2.3.14
  • sqlite3 1.3.5
  1. login admin
  2. select "My account"
  3. select "Time Zone : (GMT+9:00) Tokyo"
  4. click Save

Internal error

Processing MyController#account (for 192.168.56.1 at 2012-03-10 21:42:39) [GET]
  Parameters: {"controller"=>"my", "action"=>"account"}
Rendering template within layouts/base
Rendering my/account

ActionView::TemplateError (undefined method `new0' for DateTime:Class) on line #4 of app/views/my/_sidebar.html.erb:
1: <h3><%=l(:label_my_account)%></h3>
2: 
3: <p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
5: 
6: 
7: <h4><%= l(:label_feeds_access_key) %></h4>

    (eval):2:in `to_date'
    lib/redmine/i18n.rb:40:in `format_date'
    lib/redmine/i18n.rb:48:in `format_time'
    app/views/my/_sidebar.html.erb:4
    app/views/my/account.html.erb:48:in `block in _run_erb_app47views47my47account46html46erb'
    app/helpers/application_helper.rb:1045:in `content_for'
    app/views/my/account.html.erb:47
    <internal:prelude>:10:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.11) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.11) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
    <internal:prelude>:10:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.11) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.11) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.11) helper-scripts/passenger-spawn-server:99:in `<main>'

Rendering /opt/Redmine/redmine.d/trunk/public/500.html (500 Internal Server Error)
Actions #1

Updated by Etienne Massip about 12 years ago

  • Category set to Ruby support
  • Status changed from New to Confirmed
  • Target version set to 1.4.0
Actions #2

Updated by Toshi MARUYAMA about 12 years ago

Actions #3

Updated by Jun NAITOH about 12 years ago

I tried Ruby 1.9.2 now. But Ruby 1.9.2 don't reproduce this problem.
I think Ruby 1.9.3 only problem, too.

Actions #4

Updated by Etienne Massip about 12 years ago

Adding gem 'tzinfo' to the Gemfile did the trick for me.

Actions #5

Updated by Jun NAITOH about 12 years ago

Etienne Massip wrote:

Adding gem 'tzinfo' to the Gemfile did the trick for me.

Me too. I added to Gemfile as follows.

--- Gemfile    (revision 9237)
+++ Gemfile    (working copy)
@@ -4,6 +4,7 @@
 gem "i18n", "~> 0.4.2" 
 gem "coderay", "~> 1.0.0" 
 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
+gem "tzinfo", "~> 0.3.31" 

 # Optional gem for LDAP authentication
 group :ldap do

I think this problem was fixed by this setting.
Actions #6

Updated by Jean-Philippe Lang about 12 years ago

  • Status changed from Confirmed to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r9244. Thanks.

Actions

Also available in: Atom PDF