you are here: codestackercodes [RSS] → tag paperclip [RSS]

paperclip refresh all images

run this task

rake paperclip:refresh class=MyClass

paperclip ie validation

validates_attachment_content_type :image,
  :content_type => [
    'image/pjpeg', # for progressive jpeg (IE mine-type for regular jpeg) 

    'image/x-png', # IE mine-type for PNG


paperclip running in passenger

it's necessary set the correct path of imagemagick. in os x (dev) e linux (production):

if RAILS_ENV == "development" 
  Paperclip.options[:image_magick_path] = '/opt/local/bin/' 
  Paperclip.options[:image_magick_path] = '/usr/bin/' 
Displaying all 3 Code