paperclip refresh all images
run this task
1 rake paperclip:refresh class=MyClass
1 validates_attachment_content_type :image, 2 :content_type => [ 3 'image/jpeg', 4 'image/pjpeg', # for progressive jpeg (IE mine-type for regular jpeg) 5 'image/png', 6 'image/x-png', # IE mine-type for PNG 7 'image/gif' 8 ]
it’s necessary set the correct path of imagemagick. in os x (dev) e linux (production):
1 if RAILS_ENV == "development" 2 Paperclip.options[:image_magick_path] = '/opt/local/bin/' 3 else 4 Paperclip.options[:image_magick_path] = '/usr/bin/' 5 end