Page 1 of 1

[paperclip] An error was received while processing: #<Paperclip::Error: There was an error processing the thumbnail for

Posted: 2015-04-14T22:16:37-07:00
by puja
I am not able to crop image. In my console I can see following output:

Code: Select all

Started PATCH "/users/22/crop" for 127.0.0.1 at 2015-04-15 10:42:36 +0530
Processing by UsersController#crop as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"0nZT+shqrrTXhef8IhkK6OKhLsVEh/HtZwfWZ7PwCIeKdrqX3Tx/rjWhk1sUHAJvU/mQNITysNijk7OvHwKBYw==", "user"=>{"
crop_x"=>"18", "crop_y"=>"46", "crop_w"=>"89", "crop_h"=>"89"}, "commit"=>"Crop", "id"=>"22"}
  User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 22]]
   (0.0ms)  begin transaction
   (0.0ms)  commit transaction
Command :: PATH=/usr/bin:$PATH; file -b --mime '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-1b4751.jpg'
Command :: PATH=/usr/bin:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]' 2>/dev/n
ull
Command :: PATH=/usr/bin:$PATH; identify -format %m '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]'
Command :: PATH=/usr/bin:$PATH; convert '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]' -crop #{target.crop_w}x#{target.crop_h+#{targ
et.crop_x+#{target.crop_y} -auto-orient -resize "x100" +repage '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x820150415-4162-1j6h89z'
convert.im6: missing an image filename `-crop' @ error/convert.c/ConvertImageCommand/3046.
[paperclip] An error was received while processing: #<Paperclip::Error: There was an error processing the thumbnail for 334deb7b21e3a70079ee47f9582d6df6
20150415-4162-n969x8>
Command :: PATH=/usr/bin:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]' 2>/dev/n
ull
Command :: PATH=/usr/bin:$PATH; identify -format %m '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]'
Command :: PATH=/usr/bin:$PATH; convert '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x8.jpg[0]' -auto-orient -resize "500x500>" '/tmp/334deb7
b21e3a70079ee47f9582d6df620150415-4162-n969x820150415-4162-1ta0pr5'
Command :: PATH=/usr/bin:$PATH; file -b --mime '/tmp/334deb7b21e3a70079ee47f9582d6df620150415-4162-n969x820150415-4162-1ta0pr5'
   (0.1ms)  begin transaction
   (0.1ms)  rollback transaction

Redirected to http://localhost:3000/users.22
And In my crop method under users_controller I have following line which is returning false :
  • @user.image.reprocess!