Issue with running a compiled rebar3 erlang application with erl -pa

An erlang OTP application (nerlnetApp) that depends on cowboy compiled and run successfully when executed using the command: rebar3 shell, from application directory.

However, erlang shell cannot run in CI environment and therefore we decide to run it using the following method:

erl -pa jsx/ebin ranch/ebin cowlib/ebin cowboy/ebin nerlnetApp/ebin -eval "nerlnetApp_app:start(a,b)."

This command generates the following error:

{"init terminating in do_boot",

Link to nerlnetInitiator where init_cowboy_start_clear fails.
Link to application directory with rebar.config file.


  • The function nerlnetApp_app:start/2 is the callback function for the application behaviour - it's not meant to be called directly. Try this instead:

    -eval "application:ensure_all_started(nerlnetApp, permanent)."

    That will start all dependencies, including ranch, before starting the application itself. That should avoid the noproc error, which suggests that there is no running process named ranch_sup.