jrgifford / delayed_paperclip

Process your Paperclip attachments in the background with delayed_job or Resque.
http://www.jstorimer.com/ruby/2010/01/30/delayed-paperclip.html
MIT License
402 stars 155 forks source link

Rails 2 #53

Closed maintux closed 11 years ago

maintux commented 11 years ago

Hi guys, I'm trying to use this gem (version 2.4.5.2) with rails 2.3.18, paperclip 2.7.5 and delayed_job 2.0.8, but I have back this error:

ArgumentError (Cannot enqueue items which do not respond to perform):
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_job-2.0.8/lib/delayed/backend/base.rb:13:in `enqueue'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip/jobs/delayed_job.rb:10:in `enqueue_delayed_paperclip'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip.rb:27:in `enqueue'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip.rb:89:in `enqueue_post_processing_for'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip.rb:82:in `enqueue_delayed_processing'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip.rb:81:in `each'
  /home/maintux/.rvm/gems/ree-1.8.7-2012.02/gems/delayed_paperclip-2.4.5.2/lib/delayed_paperclip.rb:81:in `enqueue_delayed_processing'

Anyone can help me? Thanks!

ScotterC commented 11 years ago

I'm guess that it almost certainly has to do with delayed job's version of 2.0.8. Did that version have a perform action?

maintux commented 11 years ago

Hi, I've solved the problem, but I need to have a new branch (rails2) starting from v2.4.5.2 tag, so I can provide a pull request for that version. At the moment I provide a pull request for master branch.

ScotterC commented 11 years ago

Branch created. Thanks

maintux commented 11 years ago

Ok pr #56 done. Can you make a new patch to include this?

ScotterC commented 11 years ago

merged.

maintux commented 11 years ago

:+1: