Closed nonotest closed 7 years ago
Hi @nonotest , I test it locally with distillery and no exception raised, could you please show me more details about the error?
Hello @falood . Note the following in the Distillery documentation:
... your application should never use anything from the Mix.* namespace
- With releases, at runtime there is no longer any Mix project information, as your application is indistinguishable from any other Erlang application. This means your application should never use anything from the Mix.* namespace.
Given that, the error is reasonably self-explanatory:
2017-08-08 12:21:00.771 [info] Application maru exited: exited in: Maru.start(:normal, [])
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function Mix.env/0 is undefined (module Mix is not available)
Mix.env()
(maru) lib/maru.ex:35: Maru.test_mode?/0
(maru) lib/maru/supervisor.ex:7: Maru.Supervisor.start_link/0
(kernel) application_master.erl:273: :application_master.start_it_old/4
The changes introduced in my pull request make Maru work with Distillery in production.
yep - @brandonparsons 's description is exactly what happens.
Thank you very much @brandonparsons @nonotest maru 0.12.2 released with this issue fixed.
Hello,
(not an elixir dev sorry if incorrect)
With the latest commits and the introduction of
test_mode/0
it seems that releases built by exrm/distillery fail without forcing the test mode to false.Attempts to run
Mix.env
but it doesn't exists with release mode so crashes. If this is true maybe we could document it better?