From: thomass@... (Thomas) Date: 2004-03-31T16:59:23+09:00 Subject: Re: Strange rubyzip behaviour (Errno::EFBIG) I have never experienced the Errno::EFBIG exception myself. If anyone else on this list has tried rubyzip and seen this problem I'd be interested in hearing about it. Travis, could you try something like this: require 'zip/zip' is = File.open("rubycode.zip", "rb") is.seek(5, IO::SEEK_SET) is.read Does that cause the problem? If it does, try without requiring 'zip/zip'. Rubyzip doesn't do anything too weird with the files, all it does is opening the archive file in "rb"-mode and seek-around and read a bit, which is what the code fragment above is intended to mimic. I have run the test suite succesfully myself on Windows XP/ruby-1.8.0 (pragprog build) and on RedHat 9.0 Linux/ruby-1.8.1 before making the release. Cheers, Thomas Travis Whitton wrote in message news:... > Hi, > I'm having a really weird issue trying to use rubyzip on FreeBSD 4.9. > Whenever I try to open a file, no matter what the size, I get: > > Errno::EFBIG: File too large > > Example is as follows(using rubyzip-0.5.5): > > travis@aop:~$ uname -a > FreeBSD aop.intranet 4.9-RELEASE-p4 FreeBSD > 4.9-RELEASE-p4 #0: Wed Mar 17 16:55:09 EST 2004 > root@aop.intranet:/usr/obj/usr/src/sys/MYKERNEL i386 > > travis@aop:~$ ruby -v > ruby 1.8.1 (2003-12-25) [i386-freebsd4] > > travis@aop:~/rubyzip/test$ irb > irb(main):001:0> $:.push("..") > => ["/usr/local/lib/ruby/site_ruby/1.8", > "/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd4", > "/usr/local/lib/ruby/site_ruby", > "/usr/local/lib/ruby/1.8", > "/usr/local/lib/ruby/1.8/i386-freebsd4", ".", ".."] > irb(main):002:0> require 'zip/zip' > ../zip/zip.rb:11: warning: already initialized constant Tempfile > => true > irb(main):003:0> Zip::ZipFile.new("rubycode.zip") > Errno::EFBIG: File too large - rubycode.zip > from ../zip/zip.rb:818:in `read' > from ../zip/zip.rb:818:in `get_e_o_c_d' > from ../zip/zip.rb:783:in `read_e_o_c_d' > from ../zip/zip.rb:808:in `read_from_stream' > from ../zip/zip.rb:869:in `initialize' > from ../zip/zip.rb:869:in `open' > from ../zip/zip.rb:869:in `initialize' > from (irb):3:in `new' > from (irb):3 > > travis@aop:~/rubyzip/test$ file rubycode.zip > rubycode.zip: Zip archive data, at least v2.0 to extract > > travis@aop:~/rubyzip/test$ ls -l rubycode.zip > -rw-r--r-- 1 travis devel 617 Apr 19 2002 rubycode.zip > > I've also tried rubyzip-0.5.3 installed from ports and gotten the same exact > problem. Any help would be appreciated. > > Thanks, > Travis Whitton