ruby on rails - CarrierWave + Mini_Magick: undefined method `write' for "":String -


recently switched rmagick mini_magick. receiving error undefined method 'write' "":string. here's uploader looks like...

class backgrounduploader < carrierwave::uploader::base   include carrierwave::minimagick   include carrierwave::mimetypes   process :set_content_type    storage :file    def store_dir     "uploads/backgrounds/#{model.id}"   end    def default_url     "/assets/fallback/default.jpg"   end    process :resize_to_fit => [1024, 1024]   process :convert => 'jpg'   process :fix_exif_rotation    def fix_exif_rotation     manipulate! |img|       img.auto_orient       img = img.gaussian_blur 5       img = yield(img) if block_given?       img     end   end    def extension_white_list     %w(jpg jpeg png)   end  end 

the issue lies in fix_exif_rotation method. if comment out line process :fix_exif_rotation works fine. i've removed ! end of auto_orient call seems have caused issues others when switching rmagick mini_magick.

any appreciated.

this comment above linked "related issue 2" suggests assigning img, except(!?) in yield, break things, first guess try img.gaussian_blur 5 instead of img = img.gaussian_blur 5.

otherwise: stack trace?


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -