How do I use File.new to find a file from Rails?
I am trying to read a file that has been saved o开发者_开发技巧n the /system folder using Paperclip, for example. But when I use that .url method from Paperclip to read that file using File.new, I get that the file isn't found. The directory is correct, but I still can't access it.
What is the right way to find a file for File.new for example? I tried to point to other files, as well, and to no avail.
I think you want the path method. That returns the filesystem path.
精彩评论