Coursemology / coursemology.org

[OBSOLETE] Coursemology v1 has now been superseded by v2 (https://github.com/coursemology/coursemology2)
https://v1.coursemology.org
MIT License
38 stars 32 forks source link

NoMethodError: undefined method `destroy' for nil:NilClass #420

Closed jsyeo closed 9 years ago

jsyeo commented 9 years ago

View details in Rollbar: https://rollbar.com/jsyeo/coursemology.org/items/100/


NoMethodError: undefined method `destroy' for nil:NilClass
  File "/home/raymoond/jenkins/workspace/coursemology_second/app/jobs/background_job.rb", line 27, in perform
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/backend/base.rb", line 105, in block in invoke_job
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/rollbar-1.3.1/lib/rollbar/delayed_job.rb", line 9, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/rollbar-1.3.1/lib/rollbar/delayed_job.rb", line 9, in block in wrap_worker
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in block (2 levels) in add
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in block in initialize
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in block in add
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in execute
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 38, in run_callbacks
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/backend/base.rb", line 102, in invoke_job
  File "(eval)", line 3, in block in invoke_job_with_newrelic_transaction_trace
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/controller_instrumentation.rb", line 364, in perform_action_with_newrelic_trace
  File "(eval)", line 2, in invoke_job_with_newrelic_transaction_trace
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 207, in block (2 levels) in run
  File "/home/raymoond/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb", line 91, in block in timeout
  File "/home/raymoond/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb", line 101, in call
  File "/home/raymoond/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb", line 101, in timeout
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 207, in block in run
  File "/home/raymoond/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/benchmark.rb", line 294, in realtime
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 206, in run
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 274, in block in reserve_and_run_one_job
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in block in initialize
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in execute
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 38, in run_callbacks
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 274, in reserve_and_run_one_job
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 190, in block in work_off
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 189, in times
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 189, in work_off
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 154, in block (4 levels) in start
  File "/home/raymoond/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/benchmark.rb", line 294, in realtime
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 153, in block (3 levels) in start
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in block in initialize
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in execute
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 38, in run_callbacks
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 152, in block (2 levels) in start
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 151, in loop
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 151, in block in start
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/plugins/clear_locks.rb", line 7, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/plugins/clear_locks.rb", line 7, in block (2 levels) in <class:ClearLocks>
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in block (2 levels) in add
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 60, in block in initialize
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 78, in block in add
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in call
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 65, in execute
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/lifecycle.rb", line 38, in run_callbacks
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/worker.rb", line 150, in start
  File "/home/raymoond/.rvm/gems/ruby-2.1.2/gems/delayed_job-4.0.2/lib/delayed/command.rb", line 104, in run
  File "/home/raymoond/.rvm/gems/ruby