How to process images with paperclip on Heroku?

Posted by Yuri on Stack Overflow See other posts from Stack Overflow or by Yuri
Published on 2010-03-18T15:17:47Z Indexed on 2010/03/18 15:21 UTC
Read the original article Hit count: 810

Filed under:
|
|

I use Heroku for my app.

I want to auto-orient image and then to resize it. So I do:

class User < ActiveRecord::Base

  Paperclip.options[:swallow_stderr] = false 

  has_attached_file :photo, :styles => { :square => "100%", :large => "100%" },
    :convert_options => {
      :square => "-auto-orient -geometry 70X70#",
      :large => "-auto-orient -geometry X300" },
    :storage  => :s3,
    :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
    :path => ":attachment/:id/:style.:extension",
    :bucket => 'mybucket'

  validates_attachment_size :photo,
    :less_than => 5.megabyte

end

It does not work with error: There was an error processing the thumbnail for stream.20143 What am I doing wrong?

© Stack Overflow or respective owner

Related posts about heroku

Related posts about ruby-on-rails