Paperclip: undefined method `to_file' for #<Paperclip::Attachment:0000> (NoMethodError)

Posted Over 11 years ago. Visible to the public.

to_file has been removed Show archive.org snapshot in Paperclip 3.0.1.

Instead of using File to access Paperclip storage objects (like this: File.read(file.to_file.path)) you can use

Paperclip.io_adapters.for(file).read
Thomas Eisenbarth
Last edit
Over 11 years ago
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2012-09-19 14:50)