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

前端 未结 14 1039
终归单人心
终归单人心 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 is related to ImageMagick. The command_path option needs to point to the location where identify is installed. From the command line, you can determine this with which identify.

    $ which identify
    /some/path/to/identify
    

    Afterwards, set command_path to that path (in config/environments/development.rb):

    Paperclip.options[:command_path] = "/some/path/to"
    

提交回复
热议问题