views:

234

answers:

1

I have Paperclip installed as a gem and i am trying to refresh the thumbnail size of the images. I'm running this command:

rake paperclip:refresh:thumbnails CLASS=User

and receiving this error:

...rake aborted! The specified key does not exist.

Any ideas?

Finn

A: 

An instance of the User model does not have an associated thumbnail. Ie. the user has not uploaded a thumbnail. The reprocess! method doesn't check if an thumbnail exists for each model instance before trying to retrieve the attachment. Therefore, S3 returns:

NoSuchKey The specified key does not exist.

Or it could be due to a bug in S3 attachment handling:

http://github.com/tomafro/paperclip/commit/64ae23ba01885e22cc69bf1264f339784ce32fc9

Sandy