All, Going out on a limb here but thought I would ask. 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... Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2007-Sep-13 22:44 UTC
Re: Rubyzip and java.util.zip.ZipFile interoperability issue
On 14 Sep 2007, at 00:37, Wes Gamble wrote:> Going out on a limb here but thought I would ask. > > 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...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. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Sep-17 18:05 UTC
Re: Rubyzip and java.util.zip.ZipFile interoperability issue
Peter, 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---