Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jeremy6d opened this issue Feb 9, 2012 · 3 comments
Open

Comments

@jeremy6d
Copy link

jeremy6d commented Feb 9, 2012

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
Copy link
Author

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
Copy link
Author

FYI, this is probably related to this DJ bug:

collectiveidea/delayed_job#337

@rmahnovetsky
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants