Cannot get a second, OTP app to start with my boss application

125 views
Skip to first unread message

jim rosenblum

unread,
Oct 29, 2013, 8:58:32 AM10/29/13
to chica...@googlegroups.com
I have a chicagoboss application that makes use of a second OTP application. I cannot get the second application to start without manual intervention. My directory structure is as follows:

project
    |-apps
           |-boss_app
           |-seond_otp_app

In my boss_app directory I have a boss.config that includes a stanza for this second OTP app, as in:
{second_otp_app, [ {path, "../second_otp_app"} ]},

I also have this second_otp_app in my boss_app.app.src file: {applications, [..., second_otp_app,..]} section.

With this in place, and not working, I tried additionally adding an explicit start in my priv/init/boss_app_01_news files. This also fails silently.

When I try to start it by hand from the erlang shell produced by starting my boss_app, I get a {error,{"no such file or directory","ehc_notifier.app"}} error.

When I manually add the path to the second app's ebin directory, I can start it by hand.

Any ideas?



Slava P.

unread,
Oct 30, 2013, 9:37:24 PM10/30/13
to chica...@googlegroups.com
on how to add application u can read in Admin application install. on git

and if u need to auto init that app, try making separate init. file for your app in priv/init

for example, this is my file for qdate jam_qdate_init.erl
-module(qdate_init).

-export([init/0, stop/1]).

init() ->  %U can add Pid etc here if req., case err etc.
qdate:start(),
{ok, [undefined]}.

stop(QdateId) -> %QdateId is a dummy var to fit pattern only
qdate:stop(). 


hope this would help


--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Sincerely, Slava P.

Evan Miller

unread,
Nov 11, 2013, 3:17:28 PM11/11/13
to ChicagoBoss
Hi Jim,

{second_otp_app, [ {path, "../second_otp_app"} ]} won't do anything.
The "path" var is a CB-specific config value that doesn't apply to
non-CB apps.

What you can do instead is put your other app into the deps/ directory
of your project. You could also use a symlink. Then call
application:start from your init script.

Evan
Evan Miller
http://www.evanmiller.org/

jim rosenblum

unread,
Nov 14, 2013, 4:29:49 PM11/14/13
to chica...@googlegroups.com
thank you, I have put it in the deps directory as you suggested. 

Вячеслав Козлов

unread,
Jun 16, 2014, 11:07:51 AM6/16/14
to chica...@googlegroups.com
Hello, Evan!
I added dependency for my custom application to rebar.config
and my custom app put to my_app_CB/deps/my_custom_app.
Please specify for me, how can I start my custom application (application:start(my_costom_app)) when start CB
Thank you!

вторник, 12 ноября 2013 г., 0:17:28 UTC+4 пользователь Evan Miller написал:

Jesse Gumm

unread,
Aug 19, 2014, 6:22:36 PM8/19/14
to chica...@googlegroups.com
Holy Moly. I let this one through replying so late. My apologies.

You can add it to an init script in priv/init

Two months late - pretty unacceptable, my bad.
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/61cffb29-c404-4f6b-a222-96bf65923ef7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
Reply all
Reply to author
Forward
0 new messages