File attachments in Rails app not working
I've got a Rails 7 app that's using ActiveStorage to upload files to S3.
This works fine locally (still uploading to S3), but error's out in production on Railway.
I'm not able to get good logs from Railway (doesn't seem to be a logger built in other than deploys) and the only error I get from the app is:
Not sure what else to do here. Wondering if it's got something to do with how Railway handles the temp file before sending to S3? But really...no actual idea here.
4 Replies
Project ID:
69ce3e31-ef99-40f9-86dc-df4f83e1c842
You might find these helpful:
- rails pdf render issue related to AWS S3 retrieval
- AWS s3 - not loading pdf's to Railway production - Rails app
⚠️ experimental feature
69ce3e31-ef99-40f9-86dc-df4f83e1c842
FWIW, here's the Sentry error: https://sentry.io/share/issue/f937c48a28b246b5871f45a37b072a54/
Sentry
ActiveRecord::RecordNotSaved: Failed to save the new associated fil...
Failed to save the new associated file_attachment. ActiveRecord::RecordNotSaved app/controllers/documents_controller.rb create False DocumentsController#create