ActiveStorage::IntegrityError in RSpec on Docker for Mac
I was also able to work around it without changing source or spec code by mounting the
/tmp
directory (the destination of the file copied from a mounted directory) as atmpfs
upon container startup (could also be set through thetmpfs
key in a docker-compose file):
--mount type=tmpfs,destination=/tmp
I saw ActiveStorage::IntegrityError
on a Rails app running in Docker for Mac recently. (Docker for Mac v3.3.3 if you’re curious.) This is a way of working around the issue in docker-compose
, based on the above quote:
services:
yourapp:
tmpfs:
- /tmp