ruby on rails - CarrierWave Image URL -


i have model has:

    mount_uploader :image, imageuploader 

when uploading image want retrieve width, height , exif data image. in before filter calling self.image.url return like:

/uploads/tmp/20110630-1316-10507-7899/emerica_wildinthestreets.jpg

the problem when try open image using:

image = minimagick::image.open(self.image.url) 

i "no such file or directory - /uploads/tmp/20110630-1312-10507-6638/emerica_wildinthestreets.jpg". seems image has been moved tmp folder it's final location self.image.url not reflecting change.

i've tried in after_save method result same. ideas?

turns out needed append "#{rails.root.to_s}/public/" self.image.url


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -