I'm trying to recreate all the thumbs. I am not sure why it is said that the key does not exist. My AWS-S3 is configured correctly and it works well (I can upload pictures without a problem.)
>> Attachment.all.each {|x|x.attachment.reprocess!} AWS::S3::NoSuchKey: The specified key does not exist. /app/d999782b-a789-4763-ac86-e8c65fa781eb/home/.bundle/gems/ruby/1.8/gems/aws-s3- 0.6.2/lib/aws/s3/error.rb:38:in `raise' /app/d999782b-a789-4763-ac86-e8c65fa781eb/home/.bundle/gems/ruby/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:72:in `request' /app/d999782b-a789-4763-ac86-e8c65fa781eb/home/.bundle/gems/ruby/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:88:in `get' /app/d999782b-a789-4763-ac86-e8c65fa781eb/home/.bundle/gems/ruby/1.8/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:134:in `value'
When I tried to do the same thing with a single object, it seems to work well, so the problem seems to be related to generating via collection.
>> Attachment.last.attachment.reprocess! => true
UPDATE: I am sure this is due to the fact that there are uploaded files, such as .htm, which must be valid image files. Any idea how to skip them?
source share