Project

General

Profile

Actions

Bug #11381

closed

undefined method `count' for #<ForemanTasks::Task state: "stopped", result: "error"> breaks dashboard.

Added by Ohad Levy over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

NoMethodError: undefined method `count' for #<ForemanTasks::Task state: "stopped", result: "error">
 | /home/foreman/gems/gems/activemodel-3.2.21/lib/active_model/attribute_methods.rb:407:in `method_missing'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/attribute_methods.rb:149:in `method_missing'
 | /home/foreman/gems/gems/foreman-tasks-0.7.3/app/views/foreman_tasks/tasks/dashboard/_tasks_status.html.erb:12:in `block in _e928fd688c34341206773096a4f6e60a'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/relation/delegation.rb:6:in `each'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/relation/delegation.rb:6:in `each'
 | /home/foreman/gems/gems/foreman-tasks-0.7.3/app/views/foreman_tasks/tasks/dashboard/_tasks_status.html.erb:8:in `_e928fd688c34341206773096a4f6e60a'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/template.rb:145:in `block in render'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:125:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/template.rb:143:in `render'
 | /home/foreman/gems/gems/deface-1.0.1/lib/deface/action_view_extensions.rb:41:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/partial_renderer.rb:237:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/renderer.rb:41:in `render_partial'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/renderer.rb:15:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/helpers/rendering_helper.rb:24:in `render'
 | /home/foreman/git/foreman/app/helpers/dashboard_helper.rb:39:in `render_widget'
 | /home/foreman/git/foreman/app/views/dashboard/index.html.erb:20:in `block (2 levels) in _80bcbb2562b01edb4bc1239974a7888b'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/helpers/capture_helper.rb:40:in `block in capture'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/helpers/capture_helper.rb:40:in `capture'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/helpers/tag_helper.rb:95:in `content_tag'
 | /home/foreman/git/foreman/app/views/dashboard/index.html.erb:14:in `block in _80bcbb2562b01edb4bc1239974a7888b'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/associations/collection_proxy.rb:91:in `each'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/associations/collection_proxy.rb:91:in `method_missing'
 | /home/foreman/git/foreman/app/views/dashboard/index.html.erb:13:in `_80bcbb2562b01edb4bc1239974a7888b'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/template.rb:145:in `block in render'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:125:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/template.rb:143:in `render'
 | /home/foreman/gems/gems/deface-1.0.1/lib/deface/action_view_extensions.rb:41:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/template_renderer.rb:47:in `block (2 levels) in render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/template_renderer.rb:46:in `block in render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/template_renderer.rb:54:in `render_with_layout'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/template_renderer.rb:45:in `render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/template_renderer.rb:18:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/renderer.rb:36:in `render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_view/renderer/renderer.rb:17:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:110:in `_render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/streaming.rb:225:in `_render_template'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:103:in `render_to_body'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/renderers.rb:28:in `render_to_body'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:88:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:16:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/benchmark.rb:303:in `realtime'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/core_ext/benchmark.rb:5:in `ms'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:40:in `block in render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:39:in `render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:10:in `default_render'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/mime_responds.rb:196:in `respond_to'
 | /home/foreman/git/foreman/app/controllers/dashboard_controller.rb:8:in `index'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:167:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:649:in `block (4 levels) in _run__2265884068973212748__process_action__4318705150246261802__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_8177'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_3035'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_8177'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:626:in `block (3 levels) in _run__2265884068973212748__process_action__4318705150246261802__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_8176'
 | /home/foreman/git/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_8176'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:625:in `block (2 levels) in _run__2265884068973212748__process_action__4318705150246261802__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_8175'
 | /home/foreman/git/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_8175'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:448:in `block in _run__2265884068973212748__process_action__4318705150246261802__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_8174'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_13'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_8174'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:414:in `_run__2265884068973212748__process_action__4318705150246261802__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:17:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:121:in `process'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:45:in `process'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal.rb:203:in `dispatch'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_controller/metal.rb:246:in `block in action'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:36:in `call'
 | /home/foreman/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
 | /home/foreman/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
 | /home/foreman/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:608:in `call'
 | /home/foreman/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
 | /home/foreman/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/head.rb:14:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
 | /home/foreman/git/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/flash.rb:242:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/cookies.rb:341:in `call'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/query_cache.rb:64:in `call'
 | /home/foreman/gems/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `_run__887868195926346614__call__1352537175482697129__callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
 | /home/foreman/gems/gems/railties-3.2.21/lib/rails/rack/logger.rb:32:in `call_app'
 | /home/foreman/gems/gems/railties-3.2.21/lib/rails/rack/logger.rb:18:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/request_id.rb:22:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
 | /home/foreman/gems/gems/activesupport-3.2.21/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call'
 | /home/foreman/gems/gems/actionpack-3.2.21/lib/action_dispatch/middleware/static.rb:83:in `call'
 | /home/foreman/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
 | /home/foreman/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
 | /home/foreman/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
 | /home/foreman/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
 | /home/foreman/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
 | /home/foreman/gems/gems/railties-3.2.21/lib/rails/engine.rb:484:in `call'
 | /home/foreman/gems/gems/railties-3.2.21/lib/rails/application.rb:231:in `call'
 | /home/foreman/gems/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/builder.rb:134:in `call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/urlmap.rb:64:in `block in call'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/urlmap.rb:49:in `each'
 | /home/foreman/gems/gems/rack-1.4.7/lib/rack/urlmap.rb:49:in `call'
 | /root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/rack/thread_handler_extension.rb:89:in `process_request'
 | /root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler/thread_handler.rb:149:in `accept_and_process_next_request'
 | /root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
 | /root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler.rb:414:in `block (3 levels) in start_threads'
 | /root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'
 | /home/foreman/gems/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `call'
 | /home/foreman/gems/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
2015-08-17T10:32:52 [app] [I]   Rendered common/500.html.erb within layouts/application (3.6ms)
2015-08-17T10:32:52 [app] [I]   Rendered layouts/base.html.erb (2.2ms)
2015-08-17T10:32:52 [app] [I] Completed 500 Internal Server Error in 1042.9ms (Views: 8.5ms | ActiveRecord: 55.0ms)

Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #11765: Dashboard error - undefined method `count' for #<ForemanTasks::Task state: "stopped", result: "success">Duplicate09/10/2015Actions
Actions

Also available in: Atom PDF