RailsCasts Pro episodes are now free!

Learn more or hide this

pratz3's Profile

GitHub User: pratz3

Comments by

Avatar

Does anybody know how to use this with delayed_jobs and delayed_paperclip. I am getting a "ActionView::Template::Error (Paperclip::Errors::NotIdentifiedByImageMagickError)". It points to:

ruby
  def avatar_geometry(style = :original)
    @geometry ||= {}
    avatar_path = (avatar.options[:storage] == :s3) ?   avatar.url(style) : avatar.path(style)
    @geometry[style] ||= Paperclip::Geometry.from_file(avatar_path)
  end

I'm really surprised there isn't much documentation of delayed jobs with paperclip. Sure cropping is great but what is the point if it takes 10-15 seconds to process an image. Please help me!