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.
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
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