I am trying to use the EXIF reader and I continue to get the error “Errno::ENOENT: No such file or directory”
I have checked and the file most certainly exists in the location I am directing it to:
<%= EXIFR::JPEG.new('/system/datas/5/original/IMG_0011.JPG').date_time %>
(This is where paperclip puts the files upon uploading)
Any ideas on why I continue to receive this error. I think the problem may not be finding the file but that error is masking the real issue.
I need to retrieve the EXIF data from picture files. Any other ideas are welcome. I am using paperclip to upload files.
Thanks!
The path you provided to EXIFR is a URL, not a path on the system. Try it:
The file is stored in the
publicdirectory of your rails app, so do something like:But paperclip also provides a method to access the path, and that is through the
pathmethod: