Ruby Zip file not found. when file exists

805 Views Asked by At

I am using ruby zip for the first time to read files and i keep getting the error file not found. i even tried putting the file in my public directory and i am still getting the exact same error but if i enter the file location im my address bar the file downloads meaning the file exists.

  <% url = URI(request.url) + @design_request.file.url(:original, false) %>
    <% Zip::File.open(url.to_s) do |zip_file| %>
        <% zip_file.each do |entry| %>
            <%= "Extracting #{entry.name}" %>
        <% end %>
    <% end %>

Any help. thanks

0

There are 0 best solutions below