I am new to both Sock.js and Erlang/Cowboy. I am trying to run a example.<br><div class="gmail_quote"><br>I have already install Erlang on Mac.<br>$ erl<br>Erlang R15B01 (erts-5.9.1) [source] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]<br>

Eshell V5.9.1  (abort with ^G)<br>1> <br><br>I am trying to run a simple echo example from my app.<br><br>====rebar.config====<br>%% -*- erlang -*-<br><br>{erl_opts, [debug_info]}. %, fail_on_warning]}.<br><br>{deps,<br>

  [<br>    {sockjs, ".*", {git, "git://<a href="http://github.com/sockjs/sockjs-erlang.git" target="_blank">github.com/sockjs/sockjs-erlang.git</a>", {branch, "master"}}}<br>  ]<br>}.<br>================<br>

<br>Note that dependency is in following way. My app has dependency on Sockjs which has dependency on Cowboy which has dependency on Proper.<br>$ ./rebar get-deps<br>After above command I get 3 folders in my deps folder. cowboy, proper & sockjs<br>

$ ./rebar compile<br><br>I am getting following error.<br><br>$ ./deps/sockjs/examples/cowboy_echo.erl <br>escript: exception error: undefined function sockjs_handler:init_state/4<br>  in function  cowboy_echo:main/1 (./deps/sockjs/examples/cowboy_echo.erl, line 17)<br>

  in call from escript:run/2 (escript.erl, line 727)<br>  in call from escript:start/1 (escript.erl, line 277)<br>  in call from init:start_it/1 <br>  in call from init:start_em/1 <br><br>I have also tried coping cowboy_echo.erl to ./src/ folder but it gives same error.<br>

<br>Are there any pointers that can help me?<br><br>Note: I can successfully run this example if I directly use sockjs-erlang rebar.config but I want to run it on my app which describes sockjs as dependency.<br><br></div>

Jai<br>