rails paperclip and passenger `is not recognized by the 'identify' command`

前端 未结 14 979
终归单人心
终归单人心 2020-11-28 06:37

When I upload a photo, my model fails validation, err well even without any validations I\'m returned this error:

/tmp/stream20100103-13830-ywmerx-0 is not r         


        
14条回答
  •  春和景丽
    2020-11-28 06:59

    This happened to me when I upgraded OS X to Lion.

    Solved it by...

    • do a brew list to see all packages you have and save this somewhere

    • uninstalling homebrew (see 'Uninstallation' on this page https://github.com/mxcl/homebrew/wiki/Installation )

    • reinstall homebrew with the usual

      ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

    • reinstalling all packages brew install ghostscript brew install imagemagick etc for any others you have

    Note, before ghostscript would reinstall I had to apply the suggestion found here: https://github.com/mxcl/homebrew/issues/6381

    brew edit ghostscript
    

    Then add the def patches block to the bottom of the Ghostscript class:

    class Ghostscript < Formula
        .... existing code here ....
    
        def patches
            { :p0 => 'http://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/print/ghostscript/patches/patch-ak' }
        end
    end 
    

    The above patch may be merged in by the time you read this.

    After that imagemagick detected jpegs correctly again.

    TL;DR completely uninstall and reinstall homebrew, ghostscript (with patch for Lion), and imagemagick

提交回复
热议问题