Seems very strange, but after making changes to the templates and running
assets:precompile in production, the assets under
public/uploads return 404.
I've checked the location and the files are there:
# tree public/uploads
│ └── 1
│ └── favicon.ico
│ ├── 2
│ │ ├── large_machine_image.jpg
│ │ ├── machine_image.jpg
│ │ └── medium_machine_image.jpg
But the browser gets:
GET http://mydomain/uploads/machine_image/2/medium_machine_image.jpg 404 (Not Found)
I've searched similar problems with Rails and Carrierwave to no avail, so I suspect that the Nginx configuration may have something to do with it.
If I upload a new file to replace it, it is shown without problems so maybe Rails picks up a temporary file and serves it instead of the one created under uploads. But, doing this becomes burdensome as the number of uploaded images increase.