> Did you #close the file before you tried to delete it?

Yep. This does not help...
Here is a similar (or maybe) identical question (I did not find the 
answer to it):

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/123985

Peter

__
http://www.rubyrailways.com