errbit/errbit — Issue #151: NoMethodError: undefined method `[]' for nil:NilClass
Author: xdmx
Created: 2012-01-29 14:59:09+00:00
State: open

Using Heroku with updated source code

Where	errs#destroy_several

Happen when you try to destroy an error with multiple notices, both from web and using the cron script

[PROJECT_ROOT][PROJECT_ROOT]/models/problem.rb:161 → attribute_count_descrease
[PROJECT_ROOT][PROJECT_ROOT]/models/problem.rb:142 → remove_cached_notice_attribures
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/proxy.rb:148 → method_missing
[PROJECT_ROOT][PROJECT_ROOT]/models/notice.rb:119 → remove_cached_attributes_from_problem
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:420 → _run_destroy_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94 → run_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:31 → destroy
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading/destroy.rb:17 → block in cascade
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/referenced/many.rb:173 → block in each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:150 → block in each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:149 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:149 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/referenced/many.rb:173 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading/destroy.rb:17 → cascade
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:31 → block in cascade!
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:28 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:28 → cascade!
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence/deletion.rb:22 → prepare
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence/operations/remove.rb:26 → persist
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:56 → remove
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:31 → block in destroy
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:414 → _run_destroy_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94 → run_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:31 → destroy
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading/destroy.rb:17 → block in cascade
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/referenced/many.rb:173 → block in each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:150 → block in each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:149 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/targets/enumerable.rb:149 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/referenced/many.rb:173 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading/destroy.rb:17 → cascade
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:31 → block in cascade!
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:28 → each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/relations/cascading.rb:28 → cascade!
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence/deletion.rb:22 → prepare
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence/operations/remove.rb:26 → persist
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:56 → remove
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:31 → block in destroy
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:414 → _run_destroy_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94 → run_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid/persistence.rb:31 → destroy
[PROJECT_ROOT][PROJECT_ROOT]/controllers/errs_controller.rb:126 → each
[PROJECT_ROOT][PROJECT_ROOT]/controllers/errs_controller.rb:126 → destroy_several
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4 → send_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:150 → process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/rendering.rb:11 → process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:18 → block in process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:451 → _run__3388083596961279367__process_action__1563062850883536918__callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410 → _run_process_action_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94 → run_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:17 → process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/rescue.rb:17 → process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:30 → block in process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52 → block in instrument
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/notifications/instrumenter.rb:21 → instrument
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52 → instrument
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:29 → process_action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:119 → process
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/abstract_controller/rendering.rb:41 → process
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal.rb:138 → dispatch
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal/rack_delegation.rb:14 → dispatch
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_controller/metal.rb:178 → block in action
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62 → dispatch
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:27 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148 → block in call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93 → block in recognize
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68 → optimized_each
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92 → recognize
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:493 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-ssl-enforcer-0.2.4/lib/rack/ssl-enforcer.rb:36 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/rack/mongoid/middleware/identity_map.rb:33 → block in call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/mongoid.rb:130 → unit_of_work
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/mongoid-2.2.4/lib/rack/mongoid/middleware/identity_map.rb:33 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/warden-1.0.5/lib/warden/manager.rb:35 → block in call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/warden-1.0.5/lib/warden/manager.rb:34 → catch
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/warden-1.0.5/lib/warden/manager.rb:34 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/best_standards_support.rb:17 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/head.rb:14 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.2.4/lib/rack/methodoverride.rb:24 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/params_parser.rb:21 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/flash.rb:182 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/session/abstract_store.rb:149 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/cookies.rb:302 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:46 → block in call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:416 → _run_call_callbacks
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:44 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.2.4/lib/rack/sendfile.rb:106 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/remote_ip.rb:48 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/show_exceptions.rb:47 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.0.10/lib/rails/rack/logger.rb:13 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.2.4/lib/rack/runtime.rb:17 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.2.4/lib/rack/lock.rb:11 → block in call
[unknown source] →
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/rack-1.2.4/lib/rack/lock.rb:11 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/actionpack-3.0.10/lib/action_dispatch/middleware/static.rb:30 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.0.10/lib/rails[PROJECT_ROOT]lication.rb:168 → call
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/railties-3.0.10/lib/rails[PROJECT_ROOT]lication.rb:77 → method_missing
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:528 → process_client
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:600 → worker_loop
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:485 → spawn_missing_workers
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/unicorn-4.1.1/lib/unicorn/http_server.rb:135 → start
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/unicorn-4.1.1/bin/unicorn:121 →
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/bin/unicorn:19 → load
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/bin/unicorn:19 →