in my RoR project I use CarrierWave + MiniMagick and hosted in Heroku for production.
I have this problem in production that sometimes the tmp file for image processing is missing. I get this error:
Errno::ENOENT: No such file or directory - /tmp/mini_magick20130319-2-3wq6l6.jpg
I have other XUploader classes that work, but this one has two image processes. Initially, I had two separate processes for this:
process :resizer def resizer resize_to_fit(model.jrac_image_width, model.jrac_image_height) end process :cropper def cropper manipulate! do |img| img.crop("442x190+#{model.jrac_crop_x}+#{model.jrac_crop_y}") img end end
but he said that I have an error on :cropper , saying that the tmp file does not exist. I tried changing the code to this, I hope that it will work only once:
process :resize_and_crop def resize_and_crop manipulate! do |img| img.resize("#{model.jrac_image_width}x#{model.jrac_image_height}")
but unfortunately they still experience the same errors.
Does anyone know where the problem is? I do not know if it was with Heroku or CarrierWave or ImageMagick?
Edit
I also have this code in the Uploader class
def cache_dir "
as for this.
source share