def extract_zip(file, destination)
FileUtils.mkdir_p(destination)
Zip::ZipFile.open(file) do |zip_file|
zip_file.each do |f|
file_path = File.join(destination, f.name)
zip_file.extract(entry, file_path) unless File.exist?(file_path)
end
end
end
I get the error undefined method `name' for nil:NilClass for this line
file_path = File.join(destination, f.name)
the zip file is not opening, idk why