Clip :: Errors :: NotIdentifiedByImageMagickError:

use error loading clip:

Command :: ident -format% wx% h '/tmp/103120121106-20384-i7dnzy.png[0]' [paperclip] An error was received while processing: # <Paperclip :: Errors :: NotIdentifiedByImageMagickError: / tmp / 103120121106-20384 -i7dnzy.png is not recognized by the ident command. >

I find the id:

joinall@nxbbs-server :/nxbbs$ type identify identify is hashed (/usr/local/bin/identify) joinall@nxbbs-server :/nxbbs$ convert logo: 2.jpg joinall@nxbbs-server :/nxbbs$ identify 2.jpg 2.jpg GIF 640x480 640x480+0+0 8-bit sRGB 256c 31.7KB 0.000u 0:00.000 

In config / environment / development.rb

  Paperclip.options[:command_path] = "/user/local/bin" 

In the application /models/user.rb

 attr_accessible :avatar has_attached_file :avatar, :styles=> {:s120 => "120x120>",:s48 => "48x48>",:s16 => "16x16>"} 

Please help me, I can not find the problem

+4
source share
2 answers

I had a similar problem and realized that I was using Paperclip 2.5 and the paper clip internally used cocaine pearls. Cocaine 0.4.2 is not backwards compatible, so I lowered cocaine to 0.3.2 and it all worked magically. In gemfile just write

 gem 'cocaine', '0.3.2' 

and run

 bundle update 
+5
source

Note for me and any other person who gets here by searching for the type of error: Imagemagick will give this error if it does not recognize the file type.

I was getting this error when users tried to upload images. I could not reproduce the problem, and it is definitely not a question of remote dependencies. It turns out they were trying to load an unrecognized type of mime - raw camera images.

+1
source

Source: https://habr.com/ru/post/1444325/


All Articles