It seems that either there is a bug, or I have implemented it wrongly, perhaps I can get some input/advise on it.
IssueUnexpected error while processing request: 404 Not Found error received then trying to lazy retrieve the files stored on AWS S3 with open-uri, as in the readme guide
The error is returned when processed, however while debugging with i.e. pry and calling open(invoice.url) it seems that the call is successful as the instance of File is returned and read can be called on it, with what seems like the right file contents.
Code sample
invoices.lazy.map do |invoice|
[open(invoice.url), 'invoice_1.pdf']
end
Error snippet
Unexpected error while processing request: 404 Not Found
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open'
/Users/.rbenv/versions/2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open'
It seems that either there is a bug, or I have implemented it wrongly, perhaps I can get some input/advise on it.
Issue
Unexpected error while processing request: 404 Not Found
error received then trying to lazy retrieve the files stored on AWS S3 with open-uri, as in the readme guideThe error is returned when processed, however while debugging with i.e.
pry
and callingopen(invoice.url)
it seems that the call is successful as the instance ofFile
is returned and read can be called on it, with what seems like the right file contents.Code sample
Error snippet