My application, when trying to run a release, has this fatal issue:
** (MatchError) no match of right hand side value: {:error, {:inets, {'no such file or directory', 'inets.app'}}}
It works fine when running it with mix
on my localhost, however the distillery 2 release has this issue.
I installed erlang-inets
ubuntu package from the erlang solutions repo and did another mix release
, but that didn't seem to fix it.
What am I missing?
You need to instruct mix
to include inets
OTP application into the release. In your mix.exs
:
def application do
[
mod: {MyApp, []},
...
applications: [:logger, ..., :inets, ...]
]
end
Sidenote: erlang-inets
has nothing to do with the issue.