jstorimer / delayed_paperclip

Process your Paperclip attachments in the background with delayed_job or Resque.
https://github.com/jrgifford/delayed_paperclip/
392 stars 245 forks source link

undefined method `post_processing=' #36

Closed carendt242 closed 13 years ago

carendt242 commented 13 years ago

ruby 1.8.7, rails 2.3.8, paperclip 2.3.0, delayed_paperclip 0.7.2

i get the error below when i do a simple @user.photo.file? call (or any variations, like @user.photo.url(:medium).) it's probably not a bug but there's a dearth of info out there. (also got same error using paperclip 2.3.8)

the error stack: NoMethodError (undefined method post_processing=' for #<Paperclip::Attachment:0x10761f528>): /usr/local/lib/ruby/gems/1.8/gems/delayed_paperclip-0.7.2/lib/delayed_paperclip.rb:94:inattachment_for' /usr/local/lib/ruby/gems/1.8/gems/delayed_paperclip-0.7.2/lib/delayed_paperclip.rb:93:in tap' /usr/local/lib/ruby/gems/1.8/gems/delayed_paperclip-0.7.2/lib/delayed_paperclip.rb:93:inattachment_for' paperclip (2.3.0) lib/paperclip.rb:227:in photo' app/controllers/users_controller.rb:57:inshow'

the model: has_attached_file :photo, :styles => { :large => ["500x500^", :jpg], :medium => ["200x200^", :jpg], :thumb => ["80x80^", :jpg], :tiny => ["48x48^", :jpg] },

:storage => :s3, :s3_credentials => {:access_key_id => "XYZ", :secret_access_key => "XYZ"}, :path => ":class/:attachment/:id/:style.:extension", :bucket => "#{Rails.env}.media.domain.com"

process_in_background :photo

Bertg commented 13 years ago

Hi,

The rewrite of delayed_paperclip relies heavily on the "post_processing" attribute provided by paperclip. This method was introduced in 2.3.9 (see commit: https://github.com/thoughtbot/paperclip/commit/91c2338578e50a718c8e615a58911d73b330801c)

I would suggest updating to the latest version of paperclip, or at leas this version. If you can not, you could apply the mentioned commit as a monkey patch.

I noticed that the gemspec is claiming 2.3.0 compatibility. I will correct that in the next release.