Use bundle to depend on it with:
gem "zipruby-compat", :require => 'zipruby', :git => "[email protected]:jawspeak/zipruby-compatibility-with-rubyzip-fork.git", :tag => "v0.3.7"
Example project using it: https://github.com/jawspeak/ruby-docx-templater
- Both rubyzip http://rubygems.org/gems/rubyzip and zipruby http://rubygems.org/gems/zipruby define Zip::File
- I didn't want to touch anything using rubyzip, but allow both libraries to coexist peacefully.
- A previous bug report: https://bitbucket.org/winebarrel/zip-ruby/issue/1/problems-with-zipruby-and-zip-fileexists
This is so that zipruby can interoperate with rubyzip. Previously, both defined Zip::File.
That was not cool, because if you had a project that used rubyzip, when you introduced rubyzip, then it will no longer work. You'd get errors like this: "undefined method `exists?' for Zip::File:Class"
Another workaround is rubyzip/rubyzip#6 where they describe changing rubyzip.