what could be causing this rails ioerror closed stream?

[亡魂溺海] 提交于 2019-12-01 03:43:08

I think I've figured it out, at least I think I do ( the client just keeps on uploading now, error-free ) . After you read data from a file that you upload, you should also CLOSE it. Who would have thought? :P

We ran into this same problem with our Rails application, although simply closing the file object didn't work for us (we use Paperclip, and it does close the File). I developed a monkeypatch to the Tempfile class that has fixed it for us, and we use as a Rails initializer.

You can grab it from http://github.com/jwinky/ruby_tempfile_ioerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!