Closed a-aerts closed 2 months ago
Hi, I've tried updating Carrierwave from 2.2.6 to 3.0.7, in my code I've got following line: attachment.file.recreate_versions!(:thumb)
attachment.file.recreate_versions!(:thumb)
It works fine on 2.2.6, on 3.0.7 it raises NoMethodError: undefined method `copy' for nil:NilClass from here: https://github.com/carrierwaveuploader/carrierwave/blob/287e9a1924cbfdf3394b9e23489b98955128aafb/lib/carrierwave/storage/fog.rb#L444
In my case, I've noticed it happening when I'm changing file's name:
attachment.file.rename(sanitized_file, keep_original: false) ThumbsJob.perform_later(attachment.id) if attachment.with_thumb?
Not sure if it's a bug connected to latest fixes regarding recreate_versions and original files, or I'm missing something?
Ruby 3.2.3, Rails 7.1.3.2, fog-aws 3.22.0
Possibly related to https://github.com/carrierwaveuploader/carrierwave/pull/2659. Try recreating all versions, not only :thumb.
:thumb
attachment.file.recreate_versions!
Hi, I've tried updating Carrierwave from 2.2.6 to 3.0.7, in my code I've got following line:
attachment.file.recreate_versions!(:thumb)
It works fine on 2.2.6, on 3.0.7 it raises NoMethodError: undefined method `copy' for nil:NilClass from here: https://github.com/carrierwaveuploader/carrierwave/blob/287e9a1924cbfdf3394b9e23489b98955128aafb/lib/carrierwave/storage/fog.rb#L444
In my case, I've noticed it happening when I'm changing file's name:
Not sure if it's a bug connected to latest fixes regarding recreate_versions and original files, or I'm missing something?
Ruby 3.2.3, Rails 7.1.3.2, fog-aws 3.22.0