title: Paperclip - Image Uploading Error: " not recognized by the 'identify' command."
body: <p>I use <em>Rails 3</em> and <em>paperclip</em>. My logic allows user to upload an image. That works fine unless the user selects a file that is not an image.</p>
  
  <p>If the user picks a text file, for instance, validation passes but ends up with this error: </p>
  
  <pre><code>5 errors prohibited the profile update:
  
  Profile pic content type is not one of image/jpeg, image/png, image/gif
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-17xuiu4-0.js is not recognized by the 'identify' command.
  </code></pre>
  
  <p>At least the first error refers to the file type. But if the user uploads some more specific file, like a <code>.PXM</code>, then Rails behaves strange and shows this:</p>
  
  <pre><code>4 errors prohibited the profile update:
  
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
  Profile pic /var/folders/lF/lF0Ne5vGFj44kV54W3zBdU+++TI/-Tmp-/stream20101118-229-1scwkg7-0.pxm is not recognized by the 'identify' command.
  </code></pre>
  
  <p>Does anyone know what's going on here? I have the following code in my model:</p>
  
  <pre><code>validates_attachment_content_type :profile_pic, :content_type=&gt;['image/jpeg', 'image/png', 'image/gif']
  </code></pre>
  
  <p>...and this paperclip initializer: </p>
  
  <pre><code>Paperclip.options[:command_path] = "/opt/local/bin/"
  </code></pre>
  
  <p>ImageMagik appears to be installed and set up correctly:</p>
  
  <pre><code>$ which Magick-config
  /opt/local/bin/Magick-config
  </code></pre>
  
  <p>Thanks!</p>