<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    I have created a rebar.config for my chronos project -
    <a class="moz-txt-link-freetext" href="https://github.com/lehoff/chronos.git">https://github.com/lehoff/chronos.git</a> - but I am having problems
    getting my example to work.<br>
    <br>
    I am starting my shell like this:<br>
    <code>    erl -pz examples -pz deps/*/ebin -pz ebin</code><code><br>
    </code><br>
    Then I am trying to run the ping_test:run_test/0, but it fails
    misserably:<br>
    <samp>1> ping_test:run_test().</samp><samp><br>
    </samp><samp>** exception exit: undef</samp><samp><br>
    </samp><samp>     in function  chronos_meck_original:start_link/1</samp><samp><br>
    </samp><samp>        called as
      chronos_meck_original:start_link(ping_timer_server)</samp><samp><br>
    </samp><samp>     in call from meck:exec/5 (src/meck.erl, line 418)</samp><samp><br>
    </samp><samp>     in call from chronos:start_link/1</samp><samp><br>
    </samp><samp>        called as chronos:start_link(ping_timer_server)</samp><samp><br>
    </samp><samp>     in call from ping:init/1 (examples/ping.erl, line
      47)</samp><samp><br>
    </samp><samp>     in call from gen_server:init_it/6 (gen_server.erl,
      line 304)</samp><samp><br>
    </samp><samp>     in call from proc_lib:init_p_do_apply/3
      (proc_lib.erl, line 227)</samp><samp><br>
    </samp><samp><br>
    </samp><samp>=ERROR REPORT==== 13-Oct-2012::22:28:13 ===</samp><samp><br>
    </samp><samp>** Generic server chronos_meck terminating </samp><samp><br>
    </samp><samp>** Last message in was {'EXIT',<0.31.0>,</samp><samp><br>
    </samp><samp>                           {undef,</samp><samp><br>
    </samp><samp>                              
      [{chronos_meck_original,start_link,</samp><samp><br>
    </samp><samp>                                   
      [ping_timer_server],</samp><samp><br>
    </samp><samp>                                    []},</samp><samp><br>
    </samp><samp>                                {meck,exec,5,</samp><samp><br>
    </samp><samp>                                   
      [{file,"src/meck.erl"},{line,418}]},</samp><samp><br>
    </samp><samp>                               
      {chronos,start_link,[ping_timer_server],[]},</samp><samp><br>
    </samp><samp>                                {ping,init,1,</samp><samp><br>
    </samp><samp>                                   
      [{file,"examples/ping.erl"},{line,47}]},</samp><samp><br>
    </samp><samp>                                {gen_server,init_it,6,</samp><samp><br>
    </samp><samp>                                   
      [{file,"gen_server.erl"},{line,304}]},</samp><samp><br>
    </samp><samp>                               
      {proc_lib,init_p_do_apply,3,</samp><samp><br>
    </samp><samp>                                   
      [{file,"proc_lib.erl"},{line,227}]}]}}</samp><samp><br>
    </samp><samp>** When Server state == {state,chronos,</samp><samp><br>
    </samp><samp>                            {dict,10,16,16,8,80,48,</samp><samp><br>
    </samp><samp>                               
      {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],</samp><samp><br>
    </samp><samp>                                 []},</samp><samp><br>
    </samp><samp>                                {{[],[],</samp><samp><br>
    </samp><samp>                                 
      [[{code_change,3}|passthrough]],</samp><samp><br>
    </samp><samp>                                 
      [[{handle_info,2}|passthrough]],</samp><samp><br>
    </samp><samp>                                  [],[],</samp><samp><br>
    </samp><samp>                                 
      [[{start_link,1}|passthrough],</samp><samp><br>
    </samp><samp>                                  
      [{stop_timer,2}|passthrough]],</samp><samp><br>
    </samp><samp>                                  [],</samp><samp><br>
    </samp><samp>                                  [[{start_timer,4}|</samp><samp><br>
    </samp><samp>                                   
      #Fun<ping_test.0.90280136>],</samp><samp><br>
    </samp><samp>                                  
      [{handle_cast,2}|passthrough]],</samp><samp><br>
    </samp><samp>                                 
      [[{handle_call,3}|passthrough],</samp><samp><br>
    </samp><samp>                                  
      [{terminate,2}|passthrough]],</samp><samp><br>
    </samp><samp>                                  [],</samp><samp><br>
    </samp><samp>                                 
      [[{stop,1}|passthrough]],</samp><samp><br>
    </samp><samp>                                  [],[],[],</samp><samp><br>
    </samp><samp>                                 
      [[{init,1}|passthrough]]}}},</samp><samp><br>
    </samp><samp>                            false,</samp><samp><br>
    </samp><samp>                            [{<0.44.0>,</samp><samp><br>
    </samp><samp>                             
      {chronos,start_link,[ping_timer_server]},</samp><samp><br>
    </samp><samp>                              error,undef,</samp><samp><br>
    </samp><samp>                             
      [{chronos_meck_original,start_link,</samp><samp><br>
    </samp><samp>                                   [ping_timer_server],</samp><samp><br>
    </samp><samp>                                   []},</samp><samp><br>
    </samp><samp>                               {meck,exec,5,</samp><samp><br>
    </samp><samp>                                  
      [{file,"src/meck.erl"},{line,418}]},</samp><samp><br>
    </samp><samp>                              
      {chronos,start_link,[ping_timer_server]},</samp><samp><br>
    </samp><samp>                               {ping,init,1,</samp><samp><br>
    </samp><samp>                                  
      [{file,"examples/ping.erl"},{line,47}]},</samp><samp><br>
    </samp><samp>                               {gen_server,init_it,6,</samp><samp><br>
    </samp><samp>                                  
      [{file,"gen_server.erl"},{line,304}]},</samp><samp><br>
    </samp><samp>                              
      {proc_lib,init_p_do_apply,3,</samp><samp><br>
    </samp><samp>                                  
      [{file,"proc_lib.erl"},{line,227}]}]}],</samp><samp><br>
    </samp><samp>                            {false,no_binary},</samp><samp><br>
    </samp><samp>                            false}</samp><samp><br>
    </samp><samp>** Reason for termination == </samp><samp><br>
    </samp><samp>** {'module could not be loaded',</samp><samp><br>
    </samp><samp>      
      [{chronos_meck_original,start_link,[ping_timer_server],[]},</samp><samp><br>
    </samp><samp>       
      {meck,exec,5,[{file,"src/meck.erl"},{line,418}]},</samp><samp><br>
    </samp><samp>        {chronos,start_link,[ping_timer_server],[]},</samp><samp><br>
    </samp><samp>       
      {ping,init,1,[{file,"examples/ping.erl"},{line,47}]},</samp><samp><br>
    </samp><samp>       
      {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},</samp><samp><br>
    </samp><samp>       
      {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}</samp><samp><br>
    </samp><samp>2> </samp><samp><br>
    </samp><br>
    It seems that the mocking is not working as it should, but I cannot
    figure out what is the problem.<br>
    I have also tried to run things from the ebin directory, but it
    still fails.<br>
    <br>
    Any advice on how to get this to work is most welcome!<br>
    <br>
    Cheers,<br>
    ___<br>
     /orben<br>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/torbenhoffmann">http://www.linkedin.com/in/torbenhoffmann</a></pre>
  </body>
</html>