Erlang: how can I automatically start all necessary applications to app?

Viewed 2634

I have necessary applications in st_db.app file like this:

{application, st_db,
 [
  {description, ""},
  {vsn, "1.0.0"},
  {registered, []},
  {modules, [st_db_app, st_db_sup, st_db]},
  {applications, [
                  kernel,
                  stdlib,
          sasl,
          crypto,
          ibrowse,
          couchbeam
                 ]},
  {mod, { st_db_app, []}},
  {env, []}
 ]}.

I need to start them (crypto, sasl, etc.) automatically to run and debug the main app. The only solution I found is to start erl with such params:

erl -pa ./ebin -pa ./deps/*/ebin -boot start_sasl -s couchbeam -s crypto -s ibrowse 

Is that the only way?

PS: btw couchbeam doesn't starts on node. It just start the couchbeam's supervisor, so I have to run in shell it manually

=PROGRESS REPORT==== 15-Jun-2011::10:22:43 ===
          supervisor: {local,couchbeam_sup}
             started: [{pid,<0.62.0>},
                       {name,couchbeam},
                       {mfargs,{couchbeam,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

2> application:start(couchbeam).
ok
3> 
=PROGRESS REPORT==== 15-Jun-2011::10:23:25 ===
          supervisor: {local,couchbeam_sup}
             started: [{pid,<0.69.0>},
                       {name,couchbeam},
                       {mfargs,{couchbeam,start_link,[]}},
                       {restart_type,permanent},
                       {shutdown,2000},
                       {child_type,worker}]

=PROGRESS REPORT==== 15-Jun-2011::10:23:25 ===
         application: couchbeam
          started_at: nonode@nohost

Is there way to fix it?

4 Answers
Related