what could be causing this rails ioerror closed stream?

后端 未结 2 913
伪装坚强ぢ
伪装坚强ぢ 2021-01-12 05:27

I have a rails application, running in development mode ( with a sqlite database ). The application\'s purpose is to allow users to upload files through a java client.

相关标签:
2条回答
  • 2021-01-12 05:49

    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

    0 讨论(0)
  • 2021-01-12 05:57

    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

    0 讨论(0)
提交回复
热议问题