rails pdf render issue related to AWS S3 retrieval

I am using aws s3 for storage of images, some are pdf's and some are jpg. Locally retrieval works fine. But in production, on Railways the retrieval of PDFs is not working, or at least they are not rendered in the view. The error message I am getting in the view is "error with image code". The Railway logs show the retrieval from AWS has occurred as normal, but they are rendered in the view. The view of pdf's depends on gems related to poppler for pdf's. The deployment logs seem the indicate the gems have installed successfully. As a side note things were working using Cloudinary but that was on heroku before switching to Railway. Could this be a rails CORS issue? Our gem issue?
4 Replies
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
It is possible that this issue is related to CORS or a gem issue. It is also possible that the issue is related to the switch from Heroku to Railway. To determine the cause of the issue, it would be helpful to review the deployment logs and the configuration of the gems related to poppler.
⚠️ experimental feature
bweathers#2023
Above are the deployment logs in message
bweathers#2023
the poppler related gem deployment lines are below: #14 23.80 Fetching cairo 1.17.8#14 23.86 Installing cairo 1.17.8 with native extensions #14 30.90 Fetching glib2 4.0.3 #14 30.96 Installing glib2 4.0.3 with native extensions #14 50.71 Fetching cairo-gobject 4.0.3 #14 50.75 Installing cairo-gobject 4.0.3 with native extensions