From 9d324308bc58d5f3ed9d56bfe152bed85d06f9a0 Mon Sep 17 00:00:00 2001 From: Massimo Maino Date: Tue, 20 Aug 2013 18:58:19 +0200 Subject: [PATCH] try to fix delayed_job version --- lib/delayed_paperclip/jobs/delayed_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/delayed_paperclip/jobs/delayed_job.rb b/lib/delayed_paperclip/jobs/delayed_job.rb index d04caed..37a6d8a 100644 --- a/lib/delayed_paperclip/jobs/delayed_job.rb +++ b/lib/delayed_paperclip/jobs/delayed_job.rb @@ -4,7 +4,7 @@ module DelayedPaperclip module Jobs class DelayedJob < Struct.new(:instance_klass, :instance_id, :attachment_name) - if defined?(::Delayed::DeserializationError) # this is available in newer versions of DelayedJob. Using the newee Job api thus. + if Gem.loaded_specs['delayed_job'].version >= Gem::Version.new("2.1.0") # this is available in newer versions of DelayedJob. Using the newee Job api thus. def self.enqueue_delayed_paperclip(instance_klass, instance_id, attachment_name) ::Delayed::Job.enqueue(