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 book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
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)