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