Monday, November 9, 2009

Paperclip - Passenger problem

Today I had very strange problem with paperclip. Application worked fine for image upload. I set it up with passenger and suddenly I noticed an error while uploading. Something like ".../tmp/stream..... is not recognized by the 'identify' command" in my flash[:error]. After some investigations it turned out that everything works with mongrel but not with passenger. Problem is solved by adding /config/initializers/paperclip-passenger-fix.rb with just one line:

Paperclip.options[:image_magick_path] = '/usr/local/bin' # or whereever your imagemagick is ( find out with 'which identify' in your terminal

No comments: