Read more

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

Thomas Eisenbarth
September 19, 2012Software engineer at makandra GmbH

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

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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
Posted by Thomas Eisenbarth to makandra dev (2012-09-19 16:50)