Skip to content

DelayedJob cannot find a CarrierWave uploader class  #1221

@tsung-yen-tsai-galvanize

Description

Hi, I'm not sure if this is the appropriate place to post this, but it seems like an issue. I am running into this error:

Job Delayed::PerformableMethod (id=3200623) (queue=default) FAILED permanently with Delayed::DeserializationError: Job failed to load: undefined class/module LogoUploader::WebVersionUploader.

I think this class is dynamically generated by CarrierWave using const_set, it seems like from here: https://github.com/carrierwaveuploader/carrierwave/blob/a5518d6ae6d2cd1dc12776fe76ac49b8ccf6d551/lib/carrierwave/uploader/versions.rb#L23 (we are using an older version, with slightly different name). Is there a way to autoload this constant so that DelayedJob can pick it up? I've tried require 'carrierwave' and require 'carrierwave/versions' in application.rb, and it does not help. We are using DelayedJob 4.1.11. Please let me know if any other details would help with this, or is it a limitation of DelayedJob and dynamically generated classes/methods? I've noticed a similar error for attr_accessor as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions