zipruby の続き。200超のファイルをzipに追加していたら、こんなエラーが出た。(T^T) Close archive failed: Failure to create temporary file: Too many open files (Zip::Error) エラーが出たときのスクリプトはこんな感じ。エラーメッセージからすると、ファイルディスクリプタを開きっぱになってるのかな? Zip::Archive.open("outdir/test.zip", Zip::CREATE) do |ar| 1000.times do |count| entry = "target.txt" + sprintf("%04d", count) ar.add_file(entry, "target.txt") end end おんで、修正したスクリプトがこちら。ファイルを1つ追加するのに z
![日々是笑心](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)