Ruby on rails 使用缓存存储文件时,rails carrierwave对象为零!有雾,;s3
我已经了解了如何重新创建和重新处理存储在fog上的文件 下面是我尝试使用carrierwave重新创建我的图像版本并将其上载到AWS的过程:Ruby on rails 使用缓存存储文件时,rails carrierwave对象为零!有雾,;s3,ruby-on-rails,amazon-web-services,amazon-s3,carrierwave,fog,Ruby On Rails,Amazon Web Services,Amazon S3,Carrierwave,Fog,我已经了解了如何重新创建和重新处理存储在fog上的文件 下面是我尝试使用carrierwave重新创建我的图像版本并将其上载到AWS的过程: product_image = ProductImage.first product_image.process_image_upload = true product_image.image.cache_stored_file! product_image.image.retrieve_from_cache!(product_image.image.ca
product_image = ProductImage.first
product_image.process_image_upload = true
product_image.image.cache_stored_file!
product_image.image.retrieve_from_cache!(product_image.image.cache_name)
product_image.image.recreate_versions!(:pattern)
product_image.save!
但在此之前:
product_image.image.cache_stored_file!
给我一个错误。它说:
NoMethodError: undefined method `body' for nil:NilClass
有人对我有同样的经历吗?提前感谢请添加完整跟踪请添加完整跟踪