cool,  ==>  erl -pa apps/dummy/ebin -eval 'dummy_app:start(25,30)'  works.<br><br>Another workaround is adding one extra start/0 function, like :<br><br>start() -> dummy_sup:start_link().<br><br>then both ==> erl -pa apps/dummy/ebin -s dummy_app and ==> erl -pa apps/dummy/ebin -s dummy_app start  worked.<br>
<br><br><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 12:53 PM, Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>On 6 Mar 2012, at 16:39, envelopes envelopes wrote:</div></div><div>
<div><blockquote type="cite"><p>
On Mar 6, 2012 2:11 AM, "Tim Watson" <<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>> wrote:<br>
><br>
> Hi there,<br>
><br>
> I'm not sure about this second issue (of the _app module not being loaded in the shell) but I can explain the former. When you run the 'erl' program with -s you are telling the built in 'init' module to run the following module, function with optional arguments. When you pass '-s mysample_app start' you are telling the init module to call that function, but 'init' is a special module, part of the runtime system. Your module isn't special, so the code server hasn't loaded it yet and 'init' can't find it so it is 'undefined' hence the error message. </p>

<p>how come ' erl -pa ebin -s mysample_app main 23' works? If the code server has not loaded it yet. The behavior is not consistent.<br><br><br></p></blockquote></div><div>My mistake I withdraw my original explanation as it was completely wrong. Ryan was correct it is due to the arity of your function. In the 'erl' documentation:</div>

<div><br></div><div>"... <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px">If no arguments are provided, the function is assumed to be of arity 0. </span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px">Otherwise it is assumed to be of arity 1, taking the list</span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:courier;word-spacing:0px">[Arg1,Arg2,...]</span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Verdana,Arial,Helvetica,sans-serif;word-spacing:0px"> as argument. </span>"</div>

<div><br></div><div>If you want to pass more than one argument on startup, you'll need to use -eval instead: 'erl pa ebin -eval 'prototype_app:start(25, 30)'</div><div><br></div><div>My misdirection notwithstanding, the idiomatic way to start an application is to either put it in a release or to pass '-s application start <myapp>' rather than call the module's start/2 function explicitly. </div>

</div></div></blockquote></div><br>