【问题标题】:Paperclip on Windows: [paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError>Windows 上的回形针:[回形针] 处理时收到错误:#<Paperclip::Errors::NotIdentifiedByImageMagickError>
【发布时间】:2017-05-11 01:18:44
【问题描述】:

当我尝试上传文件时,我在开发中遇到此错误。

Command :: file -b --mime "C:/Users/Chloe/AppData/Local/Temp/dfeacdebdd52607b78a0eca093c2ed7a20170510-45680-1dipvsw.jpg"
Command :: identify -format '%wx%h,%[exif:orientation]' "C:/Users/Chloe/AppData/Local/Temp/dfeacdebdd52607b78a0eca093c2ed7a20170510-45680-ns50at.jpg[0]" 2>NUL
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>

我没有identify 命令,并且它没有与 ImageMagick 一起安装(至少现在没有)。

>dir "C:\Program Files\ImageMagick-7.0.5-Q16"\*.exe
 Directory of C:\Program Files\ImageMagick-7.0.5-Q16

04/25/2017  06:26 AM           324,096 dcraw.exe
04/25/2017  06:24 AM        33,351,680 ffmpeg.exe
04/25/2017  06:24 AM           113,664 hp2xx.exe
04/25/2017  06:30 AM           201,728 imdisplay.exe
04/25/2017  06:30 AM           112,128 magick.exe
05/10/2017  08:53 PM         1,202,385 unins000.exe
               6 File(s)     35,305,681 bytes

我从chocolatey 安装了ImageMagickThis 问题类似,但已过时,没有相关答案。

版本:ImageMagick-7.0.5-Q16,回形针 (5.1.0)

【问题讨论】:

    标签: ruby-on-rails windows imagemagick paperclip


    【解决方案1】:

    你必须安装

    https://chocolatey.org/packages/imagemagick.tool

    相反。但是您还必须调整路径,以便 ImageMagick 的 convert 在 Window 的 convert 之前

    >where convert
    C:\Windows\System32\convert.exe
    C:\ProgramData\chocolatey\bin\convert.exe
    

    哦,使用refreshenv 并重新启动您的服务器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-01
      • 1970-01-01
      相关资源
      最近更新 更多