Paperclip image uploads in Rails - Paperclip::CommandNotFoundError

Marky picture Marky · Jul 11, 2010 · Viewed 17.6k times · Source

I'm using paperclip to handle image uploads to rails. it worked fine on my dev OSX machine, but now on my web server I get this error:

[paperclip] /Users/marky/bin/identify '-format' '%wx%h' '/tmp/stream,16451,2.JPG[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError>
[paperclip] /Users/marky/bin/identify '-format' '%wx%h' '/tmp/stream,16451,2.JPG[0]' 2>/dev/null
[paperclip] An error was received while processing: #<Paperclip::CommandNotFoundError: Paperclip::CommandNotFoundError>

Now it's clear to me the reason; identify is actually in /usr/bin/ not /Users/marky/bin/ which is from my dev machine. I have:

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

in my development.rb, but I'm still getting the error. I have no idea how to fix this, can anyone help?

Answer

MKumar picture MKumar · Jul 27, 2010

Install following packages for working with imagemagick

1) apt-get install imagemagick
2) apt-get install libmagickwand-dev
3) gem install rmagick

I think you are missing the second one.