D
ded
I am trying to unzip a zip file with this:
require 'zip/zip'
zf = Zip::ZipFile.new(zip_name)
zf.each do |ent|
File.delete(ent.name) if test(?f, ent.name)
zf.extract(ent, ent.name)
end
I get the following error message, which appears to be a library error:
NameError: uninitialized constant Zip:ecompressor::CHUNK_SIZE
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:201:in
`internal_produce_input'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:178:in `read'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:126:in `read'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `get_input_stream'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1240:in `open'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1240:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1135:in `extract'
/home/ded/lib/ruby/Section16/Retriever.rb:84:in `get_filings'
/home/ded/lib/ruby/Section16/Retriever.rb:82:in `each'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:794:in `each'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:937:in `each'
/home/ded/lib/ruby/Section16/Retriever.rb:82:in `get_filings'
/home/ded/lib/ruby/Section16/test/TestRetriever.rb:8:in
`test_getfirst'
Am I missing something here?
Thanks
ded
require 'zip/zip'
zf = Zip::ZipFile.new(zip_name)
zf.each do |ent|
File.delete(ent.name) if test(?f, ent.name)
zf.extract(ent, ent.name)
end
I get the following error message, which appears to be a library error:
NameError: uninitialized constant Zip:ecompressor::CHUNK_SIZE
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:201:in
`internal_produce_input'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:178:in `read'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:126:in `read'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `get_input_stream'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1242:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1240:in `open'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1240:in `write_file'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:1135:in `extract'
/home/ded/lib/ruby/Section16/Retriever.rb:84:in `get_filings'
/home/ded/lib/ruby/Section16/Retriever.rb:82:in `each'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:794:in `each'
/usr/lib/ruby/site_ruby/1.8/zip/zip.rb:937:in `each'
/home/ded/lib/ruby/Section16/Retriever.rb:82:in `get_filings'
/home/ded/lib/ruby/Section16/test/TestRetriever.rb:8:in
`test_getfirst'
Am I missing something here?
Thanks
ded