0

What I'm doing is trying to open a blank docx with rubyzip and i keep getting the error:

Zip::Error: File /b;a/bla/bla/existing_file.docx not found

Is there a rule in rubyzip that prevents opening empty zipfiles?

Robin Winton
  • 591
  • 10
  • 23

1 Answers1

0

rubyzip only supports compressing existing files. What you can do is to create an empty file using touch, then zip it.

require "fileutils"
FileUtils.touch '/b;a/bla/bla/existing_file.docx'
Linus Oleander
  • 17,746
  • 15
  • 69
  • 102