Initially i have used zipruby gem and upgrading the rails environment and try to switch rubyzip. then what will be the equivalent of this.
Used gem in gem file - gem 'rubyzip',gem 'nokogiri',rails-4.1.9,ruby -2.2
Zip::Archive.open("#{@docx_file.path}") do |dest|
n = dest.num_files
n.times do |i|
case dest.get_name(i)
when 'word/document.xml'
dest.replace_buffer i, @docx[:template].to_xml
else
#
end
end
end
issue -uninitialized constant Zip::Archive