title: Rails 3 & Paperclip: "not recognized by the 'identify' command"
body: <p>A few system details:</p>
  
  <ul>
  <li>Mac OS X Lion 10.7.2, Rails 3, Paperclip gem.</li>
  <li>ImageMagick 6.7.3-0, binaries installed using MacPorts in <code>/opt/local/bin</code>.</li>
  <li>Using WEBrick in development environment.</li>
  </ul>
  
  <p>I'm trying to upload photos that should get resized down into thumbnails. When I do so, the original uploaded file is saved and can be accessed via HTTP correctly. When I try to accessed the thumbnail version, I get this error:</p>
  
  <pre><code>Routing Error
  No route matches "[file_URL]"
  </code></pre>
  
  <p>Before that, when uploading a valid PNG file, I see this error in my WEBrick log:</p>
  
  <pre><code>[paperclip] An error was received while processing: #&lt;Paperclip::NotIdentifiedByImageMagickError: /var/folders/n4/62q22gb52rjd0h13cx_j8vv40000gq/T/stream20111020-24984-17560xt-0.png is not recognized by the 'identify' command.&gt;
  </code></pre>
  
  <p>Doing <code>which identify</code> outputs:</p>
  
  <pre><code>/opt/local/bin/identify
  </code></pre>
  
  <p>Calling <code>identify</code> with the path of the uploaded file correctly identifies the file as a PNG file.</p>
  
  <p>I confirmed <code>rails server</code> starts the development environment.  I added the following in <code>config/environments/development.rb</code>:</p>
  
  <pre><code>Paperclip.options[:command_path] = "/opt/local/bin"
  </code></pre>
  
  <p>My Photo model has the following:</p>
  
  <pre><code>class Photo &lt; ActiveRecord::Base
    has_attached_file :file, :default_style =&gt; :view, :styles =&gt; {
      :view =&gt; { :geometry =&gt; '520x390&gt;', :format =&gt; 'jpg' },
      :preview =&gt; { :geometry =&gt; '160x120&gt;', :format =&gt; 'jpg' } }
    validates_attachment_content_type :file,
      :content_type =&gt; [ 'image/jpeg', 'image/pjpeg', 'image/png' ]
  end
  </code></pre>
  
  <p>My Photos controller:</p>
  
  <pre><code>class PhotosController &lt; ApplicationController
    # ...
    def create
      @photo = Photo.create params[:photo]
    end
  end
  </code></pre>
  
  <p>Like I said, I can access the original images in the URL path <code>system/files/:id/original</code>, but the resized versions I want aren't accessible and are not found in the filesystem. WEBrick's log suggest Paperclip can't even have ImageMagick identify the images before resizing them.</p>
  
  <p>Any ideas?  Thanks in advance!</p>