[erlang-questions] Starting application with dependences [newbie]

Roberto Aloi prof3ta@REDACTED
Fri Oct 3 22:20:45 CEST 2014


Hi Carlo,

Your interpretation is correct.
The applications listed in the .app file are simply *required* to be
started before the given application. They are not started automatically.
You can create a "release" (i.e. wrap a set of applications into a single
entity) and specify which applications to start there.
See: http://learnyousomeerlang.com/release-is-the-word
Or you can use the "ensure_all_started" approach, as Steve suggests while
I'm still typing this.

Cheers,

Roberto

On 3 October 2014 21:14, Carlo Pires <carlopires@REDACTED> wrote:

> Hello,
>
> I'm trying to start and application from erlang REPL and got the message:
>
> 2> application:start(echo_test).
> {error,{not_started,erlzmq}}
>
> But erlzmq is listed in applications section of OTP app file:
>
> {application, echo_test,
>  [
>   {description, "Echo test with erlzmq2"},
>   {vsn, "1"},
>   {modules, [echo_test, echo_test_sup, echo_test_app]},
>   {registered, [echo_test_sup]},
>   {applications, [kernel, stdlib, erlzmq]},
>   {mod, {echo_test_app, []}},
>   {env, []}
>  ]}.
>
> Looking at some apps from github I noticed the use of a mechanism like
> *ensure_app_start* in each app:start() function.
>
> So, Isn't supposed that erlang OTP app controller will start the dependent
> applications listed in app file? What am I missing here?
>
>
> --
>   Carlo Pires
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Roberto Aloi
---
Website: http://roberto-aloi.com
Twitter: @robertoaloi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141003/c450e0a3/attachment.htm>


More information about the erlang-questions mailing list