简体   繁体   中英

Paperclip gives an error, possibly due to wrong path variable?

I'm using paperclip with Rails 3. Trying to upload an image. I've looked at some other questions but I can't seem to solve it.

I get this error trying to save my model:

Photo C:/Users/Benjamin/AppData/Local/Temp/ben_2.png20120408-3864-l1w6rb is not        recognized by the 'identify' command.
Photo C:/Users/Benjamin/AppData/Local/Temp/ben_2.png20120408-3864-l1w6rb is not recognized by the 'identify' command.

in my development.rb I have

Paperclip.options[:command_path] = "/c/Program Files/ImageMagick-6.7.6-Q16/convert"

Running which convert gives me:

$ which convert
/c/Windows/system32/convert

Running which identify gives me:

$ which identify
//empty line

My path is something like this:

C:\Program Files\ImageMagick-6.7.6-Q16;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Smart Projects\IsoBuster;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\MiKTeX 2.9\miktex\bin\

Any help on what I'm doing wrong?

Solved with a reinstall of imagemagick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM