在发帖时,没有格式化 下面的代码,显示不全面,重新编辑再发。
在 update 时报错:
Started PUT "/users/10002" for 192.168.0.241 at 2012-11-07 09:49:48 +0800
Processing by UsersController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"pLn6+LfnNeghxwJwFLd6CkhU9CVgU3Grv1pI3vkmNT4=", "user"=>{"netname"=>"哀思2", "avatar"=>#<ActionDispatch::Http::UploadedFile:0xa14ffb4 @original_filename="Desert.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"Desert.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/tmp/RackMultipart20121107-1448-4ejq2m>>}, "commit"=>"修改", "id"=>"10002"}
User Load (1.7ms) SELECT "USERS".* FROM "USERS" WHERE "USERS"."ID" = :a1 AND ROWNUM <= 1 [["id", 10002]]
Command :: identify -format %wx%h '/tmp/Desert20121107-1448-1uo0vp7.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /tmp/Desert20121107-1448-1uo0vp7.jpg is not recognized by the 'identify' command.>
Command :: identify -format %wx%h '/tmp/Desert20121107-1448-1uo0vp7.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /tmp/Desert20121107-1448-1uo0vp7.jpg is not recognized by the 'identify' command.>
Command :: identify -format %wx%h '/tmp/Desert20121107-1448-1uo0vp7.jpg[0]'
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: /tmp/Desert20121107-1448-1uo0vp7.jpg is not recognized by the 'identify' command.>
Redirected to http://192.168.0.5:3000/users/10002/edit
Completed 302 Found in 303ms (ActiveRecord: 1.7ms)
但是上传 这个图片是正常的。其他图片都不行,真是好奇怪哦。
![](http://l.ruby-china.com/photo/2d7153fdf197582dbcd03fd5a6624952.jpg)