From: James Date: 2003-12-09T12:02:54+09:00 Subject: Re: ruby-zip problem Takashi & Kayoko Sano wrote: > Hi folks, > > I'm now playing with ruby-zip. I can make it work right for > decompression of zip files, but somehow not for compression. > It actually creates a zip file, but it's corrupted. Could anyone > point me to the right direction? I'm a novice programmer and ruby-zip > is scarcely documented, so maybe I'm not aware of things that > require attention. > > The sample script is shown below. > > require 'zip/zip' > > Zip::ZipFile.open("test.sxw") {|zf| > zf.replace("content.xml", "content_new.xml") > } I've encountered the same issue doing the same thing. You may be interested in a new RubyForge project, OOo4R, which intends to offer a reasonably compleate, pure-Ruby API for manipulating OpenOffice documents. http://ooo4r.rubyforge.org/ (There's no code there as of yet. I have to sort out some ideas I tried out recently and then upload the code classes.) The project was born from Daniel Carrera's OOoExtract program. http://www.math.umd.edu/%7Edcarrera/openoffice/tools/ooo_extract.html If you get an answer to your problem, please post it to ruby-talk. If I figure it out I'll do the same. James