Connection lost
Reconnecting. If you just saved something, check that it saved before trying again.
Server error
Reconnecting to the server. If you just saved something, check that it saved before trying again.
Reliable File Access in Elixir Release
mbashia
0 comments
When dealing with file access in Elixir releases, using File.read!(file_path) directly might cause issues, as it may not locate files bundled in the release. To ensure your file is correctly located within the release, especially in priv directories, use :code.priv_dir/1 with Path.join/2:
file_path = Path.join(:code.priv_dir(:phx_tools), "file.sh")
File.read!(file_path)
This approach ensures that the file path works reliably in both development and production, avoiding missing file errors in releases.