Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Windows - identify called with wrong arguments #220

janpipek opened this Issue · 3 comments

4 participants


Uploading a picture fails when identify is called. The arguments are surrounded by single quotes, which is somehow not understood well by identify.

Quick hack in changing single quotes in Paperclip::quote_command_options to double quotes solved the problem for me (and it runs comparably well under Linux and BSD).

  def quote_command_options(*options) do |option|
      # option.split("'").map{|m| "'#{m}'" }.join("\\'")
      option.split("\"").map{|m| "\"#{m}\"" }.join("\\\"")

I am not that experienced with quoting in bash and windows command shell so I cannot think of potential problems arising from it, but maybe it would be a good idea to apply this change?

Currently, I am not running the Windows machine and cannot tell the exact version of imagemagick used but it surely was yesterday's paperclip, 1.8.7 ruby, 2.3.8 rails and up-to-date Windows XPsp3. I can provide the details later if they are of interest.


I have the same problem.
After playing around is %PATH% vars etc.. I found the same thing as you.

At the moment I have gone back to an older version (, as this is working for me.

Log command outputs
Version - (works):
[paperclip] C:\Program Files\ImageMagick\identify -format "%wx%h" "C:/Windows/Temp/stream.7244.0"[0]

Version - 2.3.2 && 2.3.3 (Does not work)

[paperclip] C:\Program Files\ImageMagick\identify '-format' '%wx%h' 'C:/Windows/Temp/stream,784,0.jpg[0]'

I'm running:
Windows Server 2003 32bit
Ruby - ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]
Rails 2.3.5
ImageMagic - ImageMagick-6.6.2-9-Q16-windows-dll


Thank you.

In the version 2.3.3 I had to change the quotes in


and also in

thumbnail.rb/transformation_command (which calls the "convert" command)

to get paperclip working on my Windows machine.

I hope this will be incorporated in the plugin soon.


We've migrate the command invocation to another gem named Cocaine. If there's still a problem, please reopen this ticket. Thank you.

@sikachu sikachu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.