Redmine内部错误

时间:2011-09-25 22:15:34

标签: ruby-on-rails ruby redmine internal-server-error

我在Redmine中尝试访问“我的帐户”时遇到内部错误。但重新加载页面后没有内部错误,我可以访问该页面。以下是Redmine日志中的信息:

  

处理MyController#account(2011-09-26的91.90.15.48)   01:10:20)[GET]参数:{“action”=>“account”,   “controller”=>“my”}布局/基础渲染中的渲染模板   我/帐户

     

ActionView :: TemplateError(未初始化的常量   ActiveSupport :: TimeZone :: TZInfo)在第3行   app / views / users / _preferences.html.erb:1:<%fields_for:pref,   @ user.pref,:builder => TabularFormBuilder,:lang => CURRENT_LANGUAGE   do | pref_fields | %GT; 2:

<%= pref_fields.check_box:hide_mail%>

  3:

<%= pref_fields.select:time_zone,   ActiveSupport :: TimeZone.all.collect {| z | [z.to_s,z.name]},   :include_blank => true%>

4:

<%= pref_fields.select   :comments_sorting,[[l(:label_chronological_order),'asc'],   [l(:label_reverse_chronological_order),'desc']]%>

5:

<%=   pref_fields.check_box:warn_on_leaving_unsaved%>

6:<%end%>

app/views/users/_preferences.html.erb:3
app/views/users/_preferences.html.erb:1
app/views/my/account.rhtml:40:in
     

_run_rhtml_app47views47my47account46rhtml' app/views/my/account.rhtml:8:in _ run_rhtml_app47views47my47account46rhtml”       乘客(2.2.15)   lib / phusion_passenger / rack / request_handler.rb:92:in process_request' passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in main_loop'       乘客(2.2.15)   LIB / phusion_passenger / railz / application_spawner.rb:441:在   start_request_handler' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in handle_spawn_application”       乘客(2.2.15)lib / phusion_passenger / utils.rb:252:in   safe_fork' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in handle_spawn_application”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:352:in   __send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in 中main_loop”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:196:in   start_synchronously' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in 开始”       乘客(2.2.15)   lib / phusion_passenger / railz / application_spawner.rb:222:在start' passenger (2.2.15) lib/phusion_passenger/railz/framework_spawner.rb:291:in handle_spawn_application'中       乘客(2.2.15)   LIB / phusion_passenger / abstract_server_collection.rb:126:在   lookup_or_add' passenger (2.2.15) lib/phusion_passenger/railz/framework_spawner.rb:286:in handle_spawn_application”       乘客(2.2.15)   LIB / phusion_passenger / abstract_server_collection.rb:80:在   synchronize' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in 同步”       乘客(2.2.15)   LIB / phusion_passenger / railz / framework_spawner.rb:284:在   handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in 发送”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:352:in   main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in start_synchronously”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:163:in   start' passenger (2.2.15) lib/phusion_passenger/railz/framework_spawner.rb:101:in开始”       乘客(2.2.15)lib / phusion_passenger / spawn_manager.rb:253:in   spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in lookup_or_add”       乘客(2.2.15)lib / phusion_passenger / spawn_manager.rb:247:in   spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in 同步”       乘客(2.2.15)   LIB / phusion_passenger / abstract_server_collection.rb:79:在   synchronize' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in spawn_rails_application”       乘客(2.2.15)lib / phusion_passenger / spawn_manager.rb:145:in   spawn_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in handle_spawn_application”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:352:in   __send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in 中main_loop”       乘客(2.2.15)lib / phusion_passenger / abstract_server.rb:196:in   `start_synchronously'

     

渲染/home/eosweb/rails_apps/Redmine/public/500.html(500   内部服务器错误)

     

处理TimeTrackersController#render_menu(适用于95.81.29.50 at   2011-09-26 01:10:26)[POST]参数:{“action”=>“render_menu”,   “authenticity_token”=> “中Shjxnqzbk2l3hFzHQIAoibBQLfgKwmOnC5p0XMh4P /克=”,   “controller”=>“time_trackers”}在14ms完成(查看:10,DB:1)|   200 OK [http://redmine.eos-soft.com/time_trackers/render_menu]

     

处理MyController#account(2011-09-26的91.90.15.48)   01:10:32)[GET]参数:{“action”=>“account”,   “controller”=>“my”}布局/基础渲染中的渲染模板   我的/账号在49ms完成(查看:46,DB:0)| 200好的   [http://redmine.eos-soft.com/my/account]

有什么不对?

1 个答案:

答案 0 :(得分:0)

由于Redmine不使用Bundler,因此安装在系统上的新的或更新的gems很容易导致这样的错误。我得到了同样的错误,并通过将Redmine放在Bundler上来解决它。 Bundler保留了安装但不在Gemfile中的宝石无意中被包含在Rails应用程序中。

假设安装的新宝石是故意放在那里的,你会想要使用bundler来阻止Redmine加载它们。如果不是这样的话,也许你应该看看是否安装了tzinfo gem并将其卸载。

要使用bundler,请先安装bundler gem

gem install bundler

然后按照http://gembundler.com/rails23.html

上的说明操作

您可以查看https://github.com/SciMed/redmine/commit/e94b607b3d9843085c178057702199a819d3725a作为您对Redmine应用程序进行更改的示例。

确保在gemfile中包含rails和你正在使用的任何数据库适配器(在我的例子中,pg用于postgresql)。

重新启动您的应用,此问题应该消失。