1) be sure to put in your environment file (inside your initializer)

config.gem “paperclip”

2) make sure your form_form has multipart set to true like this:

<% form_for @photo, :html => { :multipart => true } do |f| %>

3) if using passenger, you must put this in config/initializers/paperclip.rb:

if RAILS_ENV == “development”
Paperclip.options[:image_magick_path] = ‘/opt/local/bin/’
end

(Make sure your imagemagick binaries are really in /opt/local/bin/. You can type /opt/local/bin/convert -v to check. I would recommend the MacPorts installation of ImageMagick and re-install if you are unsure.)

4) If you’re having trouble getting it to generate thumbnails, try setting Paperclip.options[:log_commands] = true and see what it’s trying to run.

By Jason

Leave a Reply

Your email address will not be published. Required fields are marked *