I have a Rails 5.1 application with functionality for uploading documents.
I implemented the upload-functionality with Paperclip (version 5.1). The uploads are stored on Amazon S3. Uploading documents works fine initially, but previously uploaded images are broken when I redeploy the application with Capistrano to the production server. When I look in the production.log I see this RoutingError:
F, [2017-11-06T14:07:26.682736 #446] FATAL -- : [012253d0-c103-4e57-8065-33830ad76b9b] ActionController::RoutingError
(No route matches [GET] "/system/absences/attest_pics/000/000/008/original/boekcover.jpg"):
in the View I implemented the link to the document like this:
<% if absence.attest_pic.present? %>
<td>
<%= link_to "Download", absence.attest_pic.url %>
</td>
<% end %>
Does anyone has experience with this behaviour?
Thanks for your help,
Anthony