我正在尝试运行这牛仔示例,使用rebar3:牛仔版本2.0.0-pre.5
我所做的是:
rebar3 new app hello_world{cowboy,".*", {git, "https://github.com/ninenines/cowboy", {branch, "master"}}}rebar3 compile。一切都很好erl -pa _build/default/lib/*/ebinapplication:start(hello_world).就会发生错误
{error,{bad_return,{{hello_world_app,start,[normal,[]]},
{'EXIT',{noproc,{gen_server,call,
[ranch_sup,
{start_child,{{ranch_listener_sup,http},
{ranch_listener_sup,start_link,
[http,100,ranch_tcp,
[{connection_type,supervisor},{port,...}],
cowboy_clear,
#{connection_type => supervisor,...}]},
permanent,infinity,supervisor,
[ranch_listener_sup]}},
infinity]}}}}}}
=INFO REPORT==== 24-Jan-2017::18:34:52 ===
application: hello_world
exited: {bad_return,
{{hello_world_app,start,[normal,[]]},
{'EXIT',
{noproc,
{gen_server,call,
[ranch_sup,
{start_child,
{{ranch_listener_sup,http},
{ranch_listener_sup,start_link,
[http,100,ranch_tcp,
[{connection_type,supervisor},
{port,8080}],
cowboy_clear,
#{connection_type => supervisor,
env => #{dispatch => [{'_',[],
[{[],[],toppage_handler,
[]}]}]}}]},
permanent,infinity,supervisor,
[ranch_listener_sup]}},
infinity]}}}}}
type: temporaryrunch_sup似乎无法启动。我的方法怎么了?我希望运行与示例中完全相同的src代码。
https://stackoverflow.com/questions/41832685
复制相似问题