I’m trying to change the tmp
directory used by my Rails application to a custom directory, but so far, nothing I’ve tried has worked.
I’ve followed several suggestions, such as setting the TMPDIR
environment variable in various locations (e.g., shell, .bashrc
, and service files). However, Rails still defaults to /tmp
.
I came across this Stack Overflow question from 11 years ago, which states that it might not be possible to change the tmp
directory, but this information is quite old.
Has anything changed in Rails since then? Is there now a Rails-specific configuration or another way to ensure the app consistently uses a custom tmp
directory?
Any updated insights or working examples would be greatly appreciated.
2