Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2

Added by J B over 9 years ago

Hi,

I get this error:

    lib/redmine/i18n.rb:47:in `format_time'
    app/views/attachments/_links.rhtml:14:in `_run_rhtml_app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
    app/views/attachments/_links.rhtml:2:in `_run_rhtml_app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
    app/helpers/attachments_helper.rb:27:in `link_to_attachments'
    app/views/wiki/show.rhtml:32:in `_run_rhtml_app47views47wiki47show46rhtml'
    app/controllers/wiki_controller.rb:80:in `show'
    passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.7) helper-scripts/passenger-spawn-server:99

Rendering /rails/rzkv002/redmine-1.1.2/public/500.html (500 Internal Server Error)

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.3.10)
actionpack (2.3.10)
activerecord (2.3.10)
activeresource (2.3.10)
activesupport (2.3.10)
arel (2.0.9)
arrayfields (4.7.4)
Ascii85 (1.0.0)
builder (2.1.2)
bundler (1.0.12)
cgi_multipart_eof_fix (2.5.0)
daemon_controller (0.2.6, 0.2.5)
daemons (1.1.2, 1.1.0)
erubis (2.6.6)
fastthread (1.0.7)
fattr (2.2.0, 2.1.0)
ferret (0.11.6)
file-tail (1.0.5)
gem_plugin (0.2.3)
i18n (0.4.2, 0.3.5)
json (1.4.6)
log4r (1.1.8)
mail (2.2.17)
main (4.4.0)
maruku (0.6.0)
mime-types (1.16)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
nokogiri (1.4.3.1)
passenger (3.0.7)
pdf-reader (0.9.1)
piston (2.0.10)
polyglot (0.3.1)
prawn (0.11.1)
prawn-core (0.8.4)
prawn-format (0.2.3)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.2.1, 1.1.2)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.10)
rake (0.8.7)
rmagick (2.13.1)
rubygems-update (1.3.7)
sparklines (0.5.2)
sparklines_generator (0.2.2)
spruz (0.2.5)
syntax (1.0.0)
thor (0.14.6)
treetop (1.4.9)
ttfunk (1.0.1)
tzinfo (0.3.26)

Anyone a idea?

Replies (9)

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by Etienne Massip over 9 years ago

The top of the exception stack trace is missing ?

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by J B over 9 years ago

Processing WikiController#show (for 134.100.2.36 at 2011-04-27 17:13:56) [GET]
  Parameters: {"project_id"=>"fiona", "action"=>"show", "id"=>"Tcl_Client", "controller"=>"wiki"}
Rendering template within layouts/base
Rendering wiki/show

ActionView::TemplateError (uninitialized constant ActiveSupport::TimeWithZone) on line #14 of app/views/attachments/_links.rhtml:
11:                                          :title => l(:button_delete) %>
12:   <% end %>
13:   <% if options[:author] %>
14:     <span class="author"><%= attachment.author %>, <%= format_time(attachment.created_on) %></span>
15:   <% end %>
16:   </p>
17: <% end %>

    lib/redmine/i18n.rb:47:in `format_time'
    app/views/attachments/_links.rhtml:14:in `_run_rhtml_app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
    app/views/attachments/_links.rhtml:2:in `_run_rhtml_app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
    app/helpers/attachments_helper.rb:27:in `link_to_attachments'
    app/views/wiki/show.rhtml:32:in `_run_rhtml_app47views47wiki47show46rhtml'
    app/controllers/wiki_controller.rb:80:in `show'
    passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
    passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
    passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in `start'
    passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
    passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
    passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
    passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
    passenger (3.0.7) helper-scripts/passenger-spawn-server:99

Rendering /rails/rzkv002/redmine-1.1.2/public/500.html (500 Internal Server Error)

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by Etienne Massip over 9 years ago

Try adding a require "tzinfo" line in your config/initializers/30-redmine.rb and restart the instance.

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by J B over 9 years ago

If I add in config/initializers/30-redmine.rb

require 'tzinfo'

I get this error message:

Error message:
    no such file to load -- tzinfo (MissingSourceFile)

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by J B over 9 years ago

ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by J B over 9 years ago

See my first posting (LOCAL GEMS). It is installed -> tzinfo (0.3.26)

RE: Error: "lib/redmine/i18n.rb:47:in `format_time'" in redmine 1.1.2 - Added by Etienne Massip over 9 years ago

Right. I'm not a ruby expert, but maybe you could try to remove / install it again ?

(1-9/9)