IceskYsl/worklogs

关于 worklogs 的问题

Closed this issue · 4 comments

这几天 在安装 worklogs 到我的Redmin V2.3.1服务器上,安装前看了介绍:
0.2.1 (2013-07-09)

Compatible with Redmine 2.3.x.

安装还是正常的,但是使用的时候,有点问题,点击左上角的“工作日志”就直接报错了,详见附件的截图;

我在两个版本中测试了,都是同样的问题:

  1. ubuntu server 12.04 , Redmin V2.3.1; 使用apt-get install redmine方式安装的。
  2. ubuntu server 12.04 , Redmin V2.3.2; 在上一版本基础上手工升级的。

为了寻找有用的日志信息,我又重新来过一遍,在虚拟机里,希望有用。

Redmine 的日志信息,只找到一个/var/log/redmine/default/production.log,是安装时的日志信息:

Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.
Migrating to Setup (1)
...
...
...
Migrating to RemoveIssuesDefaultFkValues (20130217094251)
Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.

这些不行,又找了下apache的日志信息,摘录了相关的 access.log:
10.86.22.4 - - [20/Jul/2013:09:26:12 +0800] "GET /pms/worklogs HTTP/1.1" 500 877 "http://10.86.22.136/pms/projects/mes/files" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31"
127.0.0.1 - - [20/Jul/2013:09:26:17 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [20/Jul/2013:09:26:18 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"
127.0.0.1 - - [20/Jul/2013:09:26:19 +0800] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"

摘录了相关的 error.log:
[Sat Jul 20 09:07:48 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.6.17 Phusion_Passenger/3.0.13 PHP/5.3.10-1ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
Rails Error: Unable to access log file. Please ensure that /var/log/redmine/default/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:19: warning: already initialized constant UnknownFileType
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:126: warning: already initialized constant TypeFromExt
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:132: warning: already initialized constant TypeFromShebang
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:138: warning: already initialized constant TypeFromName
OpenIdAuthentication.store is nil. Using in-memory store.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.
[Sat Jul 20 09:25:50 2013] [notice] caught SIGTERM, shutting down
[Sat Jul 20 09:25:51 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.6.17 Phusion_Passenger/3.0.13 PHP/5.3.10-1ubuntu3.6 with Suhosin-Patch configured -- resuming normal operations
Rails Error: Unable to access log file. Please ensure that /var/log/redmine/default/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:19: warning: already initialized constant UnknownFileType
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:126: warning: already initialized constant TypeFromExt
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:132: warning: already initialized constant TypeFromShebang
/usr/lib/ruby/vendor_ruby/coderay/helpers/file_type.rb:138: warning: already initialized constant TypeFromName
OpenIdAuthentication.store is nil. Using in-memory store.
Creating scope :sorted. Overwriting existing method Group.sorted.
Creating scope :sorted. Overwriting existing method User.sorted.

NoMethodError (private method split' called for nil:NilClass): plugins/worklogs/app/models/worklog.rb:17:inno_need_users_ids'
plugins/worklogs/app/models/worklog.rb:26:in no_need_users' plugins/worklogs/app/controllers/worklogs_controller.rb:17:ininit_slider'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:462:in _run__65528736__process_action__843972672__callbacks' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:insend'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in __run_callback' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:385:in_run_process_action_callbacks'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:in send' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:inrun_callbacks'
/usr/lib/ruby/vendor_ruby/abstract_controller/callbacks.rb:17:in process_action' /usr/lib/ruby/vendor_ruby/action_controller/metal/rescue.rb:29:inprocess_action'
/usr/lib/ruby/vendor_ruby/action_controller/metal/instrumentation.rb:30:in process_action' /usr/lib/ruby/vendor_ruby/active_support/notifications.rb:123:ininstrument'
/usr/lib/ruby/vendor_ruby/active_support/notifications/instrumenter.rb:20:in instrument' /usr/lib/ruby/vendor_ruby/active_support/notifications.rb:123:ininstrument'
/usr/lib/ruby/vendor_ruby/action_controller/metal/instrumentation.rb:29:in process_action' /usr/lib/ruby/vendor_ruby/action_controller/metal/params_wrapper.rb:207:inprocess_action'
/usr/lib/ruby/vendor_ruby/active_record/railties/controller_runtime.rb:18:in process_action' /usr/lib/ruby/vendor_ruby/abstract_controller/base.rb:121:inprocess'
/usr/lib/ruby/vendor_ruby/abstract_controller/rendering.rb:45:in process' /usr/lib/ruby/vendor_ruby/action_controller/metal.rb:203:indispatch'
/usr/lib/ruby/vendor_ruby/action_controller/metal/rack_delegation.rb:14:in dispatch' /usr/lib/ruby/vendor_ruby/action_controller/metal.rb:246:inaction'
/usr/lib/ruby/vendor_ruby/action_dispatch/routing/route_set.rb:73:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/routing/route_set.rb:73:indispatch'
/usr/lib/ruby/vendor_ruby/action_dispatch/routing/route_set.rb:36:in call' /usr/lib/ruby/vendor_ruby/journey/router.rb:68:incall'
/usr/lib/ruby/vendor_ruby/journey/router.rb:56:in each' /usr/lib/ruby/vendor_ruby/journey/router.rb:56:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/routing/route_set.rb:612:in call' /usr/lib/ruby/vendor_ruby/rack/openid.rb:98:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/best_standards_support.rb:17:in call' /usr/lib/ruby/vendor_ruby/rack/etag.rb:23:incall'
/usr/lib/ruby/vendor_ruby/rack/conditionalget.rb:25:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/head.rb:14:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/params_parser.rb:21:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/flash.rb:242:incall'
/usr/lib/ruby/vendor_ruby/rack/session/abstract/id.rb:205:in context' /usr/lib/ruby/vendor_ruby/rack/session/abstract/id.rb:200:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/cookies.rb:341:in call' /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:64:incall'
/usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:28:incall'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in _run__121614763__call__4__callbacks' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:insend'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:405:in __run_callback' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:385:in_run_call_callbacks'
/usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:in send' /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:81:inrun_callbacks'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/callbacks.rb:27:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/remote_ip.rb:31:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/debug_exceptions.rb:16:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/show_exceptions.rb:56:incall'
/usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:32:in call_app' /usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:16:incall'
/usr/lib/ruby/vendor_ruby/active_support/tagged_logging.rb:22:in tagged' /usr/lib/ruby/vendor_ruby/rails/rack/logger.rb:16:incall'
/usr/lib/ruby/vendor_ruby/action_dispatch/middleware/request_id.rb:22:in call' /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:incall'
/usr/lib/ruby/vendor_ruby/rack/runtime.rb:17:in call' /usr/lib/ruby/vendor_ruby/active_support/cache/strategy/local_cache.rb:72:incall'
/usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in call' /usr/lib/ruby/vendor_ruby/action_dispatch/middleware/static.rb:63:incall'
/usr/lib/ruby/vendor_ruby/rack/cache/context.rb:136:in forward' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:245:infetch'
/usr/lib/ruby/vendor_ruby/rack/cache/context.rb:185:in lookup' /usr/lib/ruby/vendor_ruby/rack/cache/context.rb:66:incall!'
/usr/lib/ruby/vendor_ruby/rack/cache/context.rb:51:in call' /usr/lib/ruby/vendor_ruby/rails/engine.rb:479:incall'
/usr/lib/ruby/vendor_ruby/rails/application.rb:223:in call' /usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:insend'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in method_missing' /usr/lib/ruby/vendor_ruby/phusion_passenger/rack/request_handler.rb:96:inprocess_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:516:in accept_and_process_next_request' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_request_handler.rb:274:inmain_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:321:in start_request_handler' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:insend'
/usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:275:in handle_spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb:479:insafe_fork'
/usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:270:in handle_spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:insend'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in server_main_loop' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:instart_synchronously'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:180:in start' /usr/lib/ruby/vendor_ruby/phusion_passenger/classic_rails/application_spawner.rb:149:instart'
/usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:219:in spawn_rails_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:132:inlookup_or_add'
/usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:214:in spawn_rails_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:82:insynchronize'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:213:inspawn_rails_application'
/usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:132:in spawn_application' /usr/lib/ruby/vendor_ruby/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:in __send__' /usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:357:inserver_main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/abstract_server.rb:206:in `start

看着这些log 是否对你有用:
Started GET "/admin/plugins" for 192.168.0.2 at 2013-08-06 15:04:45 +0800
Processing by AdminController#plugins as HTML
Current user: admin (id=1)
Rendered admin/plugins.html.erb within layouts/admin (2.4ms)
Rendered admin/_menu.html.erb (5.4ms)
Rendered layouts/base.html.erb (22.2ms)
Completed 200 OK in 40ms (Views: 30.6ms | ActiveRecord: 4.1ms)
Started GET "/settings/plugin/worklogs" for 192.168.0.2 at 2013-08-06 15:04:49 +0800
Processing by SettingsController#plugin as HTML
Parameters: {"id"=>"worklogs"}
Current user: admin (id=1)
Rendered settings/plugin.html.erb within layouts/admin (4.4ms)
Missing template, responding with 404
Rendered common/error.html.erb within layouts/base (1.0ms)
Completed 404 Not Found in 92ms (Views: 40.4ms | ActiveRecord: 3.5ms)
Connecting to database specified by database.yml
OpenIdAuthentication.store is nil. Using in-memory store.
Creating scope :system. Overwriting existing method Enumeration.system.

这个问题,的确很奇葩...你可以在插件配置的时候,把不用发送日报的ID全部干掉,然后,重启,就突然间好了...

感觉是你用的代码是老的~我修复过这个问题~