views:

424

answers:

3

I have been trying to get paperclip working for a few days now with no luck! From what I am aware this error below is related to imagemagick. I have tried to uninstall and install imagemagick both with macports and manually. Also, have Paperclip.options[:command_path] = "/usr/local/bin" set. It's starting to drive me nuts!

Photo /var/folders/A7/A7X8PAnOFsCTHkFpeODoO++++TI/-Tmp-/stream,65411,0.jpeg is not recognized by the 'identify' command.

I'm running snow leopard.

This appears when I run the rails server.. "/Users/michaelorcutt/shudder/vendor/plugins/paperclip/lib/paperclip.rb:50: warning: already initialized constant VERSION"

A: 

I currently use Paperclip, ImageMagick from macports in my Snow Leopard and havent seen that issue, are you sure that file is jpg? Try renaming it to jpg (it would be stupid, but you have to rule out everything).

Try opening several of your JPG files in a text editor, and open that one and see if the first 4 characters match (or better yet do it in a binary editor). Maybe it is a file your operating system or other software recognizes as image, but is not an actual jpg and ImageMagick is confused.

Francisco Soto
just tried that. no luck.
morcutt
Can you attach the offending image or link to it?
Francisco Soto
A: 

I'm getting a simmillar error on Ubuntu 9.04 with rails 3 beta4:

[paperclip] An error was received while processing:
#<Paperclip::NotIdentifiedByImageMagickError: /tmp/sandy-cay-caribbean-beach,3857,0.jpg is not recognized by the 'identify' command.>
digitalfrost
Did you figure this out?
hornairs
+1  A: 

I've seen this problem when I was configuring ImageMagick for Rails 3 on OSX. After installing ImageMagick from mac ports and then the binary things still didn't work correctly. What finally did the trick ? finding the location of the identify binary.

which identify

put that path into your :

Paperclip.options[:command_path] =

And it should finally work.

mr_codemonkey