I have an Erlang application and I can compile it easily and run it by using basho rebar which makes an stand-alone escript executable file. I run it from command line like: ./myapp myconfig.config
My questio is that how can I run it inside Erlang shell. This application has four other applications as dependency. Rebar compile all of the easily. But I need to run this application from inside the shell like:
erl -noshell -name node1@machine -run test start parameter1 -s init stop;
But I don’t know in which path I should run it. When I try it in “ebin” folder (where beam files are located), dependencies are not accessible. As I see each dependency applications has it own “ebin” folder.
So how can I run my application by “erl -noshell” command (consider dependency applications)?
Rebar handles all these things automatically.
A typical directory structure for a Rebar-powered OTP application is something like this:
So, if you’re in the root directory of your project, you can point
erlto the right place with the-paargument. To tell it where to find both your application’s and its dependencies’ BEAM files, try the following: