I am generating a ZIP file from a Rails app. with Rubyzip 0.9.1. The
app. runs on a Mandrake Linux box which writes to a Windows filesystem
via a Samba mount.
Later, a Java program comes along and uses java.util.zip.ZipFile (JDK
1.5) to open this ZIP file. Lately I’ve been seeing read exceptions on
these ZIP files.
Anyone ever seen a case where Java had a problem reading a Ruby
generated ZIP file before?
Granted I have lots of other moving parts here so…
Anyone ever seen a case where Java had a problem reading a Ruby
generated ZIP file before?
Granted I have lots of other moving parts here so…
IIRC, I had problems with ruby-zip in one of my apps too (i know i
had to look for other option, but i can’t remember why), I just
switched over to the shell with the zip and unzip command (just put
everything in a temp folder, then zip it using the shell). Runs
smoother and faster than ruby-zip.
I definitely considered that and am glad to hear that it worked.
As it turned out, I was creating and appending to the zip file directly
on that remote SAMBA mount, so instead what I did was create the ZIP
file locally, and then copied it to the remote SAMBA mount using
FileUtils and that seems to work much better.
In fact, I had had the same issue with another part of that same app.,
and just hadn’t applied the fix across the board.
Thanks for the response.
Wes
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.