NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

Paperclip, passenger and “not recognized by the ‘identify’ command”

Posted on July 14, 2009 - Filed Under FreeBSD, RubyOnRails

If you're new here, you may want to subscribe to my RSS feed. You can also get updates by email Thanks for visiting!

If You do use awesome :) Paperclip library, and on application served by Passenger You get errors like:

Avatar /tmp/stream.1170.0 is not recognized by the 'identify' command.

most probably Passenger does not have setup environment and is missing a path. On FreeBSD identify is placed in /usr/local/bin and AFAIR this path is not included by default in PATH. As result Passenger can not find this utility.

You can try to setup environment for Passenger (Apache?) or just add in appropriate environment (in my case it was production.rb):

Paperclip.options[:command_path] = "/usr/local/bin"

Popularity: 24% [?]

Hits for this post: 4803

Similar Posts

Comments

9 Responses to “Paperclip, passenger and “not recognized by the ‘identify’ command””

  1. hosiawak on July 14th, 2009 17:39

    I hit the same problem not long ago. In my case it was Linux and a custom build of ImageMagick which ended up in /usr/local/bin. The solution is the same.

  2. Jerome on July 25th, 2009 8:14

    This issue has driven me mad. Thanx !!!

  3. Jeremy Pinnix on July 29th, 2009 19:07

    I spent a ton of time trying to figure out why Paperclip stopped working for me. Reinstalling ImageMagick didn’t help. But this did! Thank you so much for this post.

  4. Andrew on August 6th, 2009 8:46

    Thanks! I lost half a day trying to figure that one out.

  5. Sam on August 22nd, 2009 17:20

    Thanks for this.

  6. Joshua Sierles on August 29th, 2009 14:00

    Seems like this issue happens if you try to upload a file that isn’t an image. The solution there is not to specify any thumbnail styles if you’re uploading videos.

  7. The Ruby Toolbox: Rails File Uploads on September 8th, 2009 11:10

    Kramer auto Pingback[...] Paperclip, passenger and “not recognized by the ‘identif(…) about 1 month ago [...]

  8. Ben on October 19th, 2009 9:25

    For windows, make sure you close down the rails server and any command prompt instances and restart them. The imagemagick install path in program files (the folder containing identify.exe) needs to be accessible in the PATH variable. To check type echo %PATH% in the command prompt. If the imagemagick installation folder shows, the rails app should function.

  9. Jason Green on January 25th, 2010 18:35

    Thanks for the info! Much appreciated

Leave a Reply