lacquer icon indicating copy to clipboard operation
lacquer copied to clipboard

Job failed to load: undefined class/module Lacquer::DelayedJobJob

Open jeremy6d opened this issue 13 years ago • 3 comments

I've updated to the latest gem release, and when I set the backend to delayed job, the varnish purge will not execute with this last_error:

Job failed to load: undefined class/module Lacquer::DelayedJobJob

Any clue? Is there somewhere I need to require the file that defines the DelayedJobJob class?

jeremy6d avatar Feb 09 '12 15:02 jeremy6d

I was able to work around this by putting:

require "lacquer/delayed_job_job"

in config/application.rb. I know that file is required when the job is actually performed, so I'm not sure why it's giving me problems. FTR I'm on Rails 3.2.1 with the latest varnish and delayed_job. Note that I am using the mongoid version of DJ.

jeremy6d avatar Feb 10 '12 15:02 jeremy6d

FYI, this is probably related to this DJ bug:

https://github.com/collectiveidea/delayed_job/issues/337

jeremy6d avatar Feb 10 '12 21:02 jeremy6d

thanks. That fixed worked for me. But I needed to add the require "lacquer/delayed_job_job" to my job

require "lacquer/delayed_job_job"

class PaymentJob < Struct.new(:occasion) ... end

rmahnovetsky avatar May 18 '14 12:05 rmahnovetsky