2013-11-26 95 views
0

我試圖在Mac OS X 1.9中運行牛仔web服務器,並且收到堆棧跟蹤。在Ubuntu上,一切運行良好,所以我相信如果有人遇到過這個問題,這一定是一件簡單的事情。在Mac OS X中運行Erlang Cowboy Web服務器時出現異常

命令:

./_rel/bin/cowfarm command 

The stack trace: 

Exec: /Users/marcosvm/code/spikes/cowfarm/_rel/erts-5.10.2/bin/erlexec -boot /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/cowfarm -mode embedded -config /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/sys.config -args_file /Users/marcosvm/code/spikes/cowfarm/_rel/releases/1/vm.args -- console 
Root: /Users/marcosvm/code/spikes/cowfarm/_rel 
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace] 


=INFO REPORT==== 26-Nov-2013::15:08:49 === 
    application: cowboy 
    exited: {bad_return, 
       {{cowboy_app,start,[normal,[]]}, 
       {'EXIT', 
        {undef, 
         [{cowboy_app,start,[normal,[]],[]}, 
          {application_master,start_it_old,4, 
           [{file,"application_master.erl"}, 
           {line,269}]}]}}}} 
    type: permanent 
{"Kernel pid terminated",application_controller,"{application_start_failure,cowboy,{bad_return,{{cowboy_app,start,[normal,[]]},{'EXIT',{undef,[{cowboy_app,start,[normal,[]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,269}]}]}}}}}"} 

Crash dump was written to: erl_crash.dump 
Kernel pid terminated (application_controller) ({application_start_failure,cowboy,{bad_return,{{cowboy_app,start,[normal,[]]},{'EXIT',{undef,[{cowboy_app,start,[normal,[]],[]},{application_master,st 

回答

0

牛仔應用程序不在路徑:

... 
{undef, 
    [{cowboy_app,start,[normal,[]],[]}, 
... 

也許你應該從其它地方啓動應用程序,或路徑添加到牛仔申請加入「 -pa path/to/cowboy/ebin「你正在調用erlang虛擬機

+0

看起來他正在使用鋼筋,他可能只是沒有安裝依賴項。我認爲這應該工作:'螺紋鋼get-deps && rebar編譯' – Daniel

+0

安裝deps。我發現到目前爲止,在Linux上Erlang是R15B01,在我的Mac上是R1601。 –