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
- Adding Rails application to /usr/local/etc/rc.d/
- Writing tests for Ruby/Tk application
- Uploading photos to Facebook with RFacebook
- Why are You doomed being Ruby developer on Windows platform
- DRb and security
Comments
9 Responses to “Paperclip, passenger and “not recognized by the ‘identify’ command””
Leave a Reply




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.
This issue has driven me mad. Thanx !!!
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.
Thanks! I lost half a day trying to figure that one out.
Thanks for this.
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.
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.
Thanks for the info! Much appreciated