【发布时间】:2017-06-09 12:25:01
【问题描述】:
我正在尝试使用 rebar3 运行 this 牛仔示例: 牛仔版 2.0.0-pre.5
我做的是:
rebar3 new app hello_world- 将示例源复制到我的源中
- 更新 rebar.config
{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: temporary
runch_sup 似乎无法启动。 我的方法有什么问题? 我想运行与示例中完全相同的 src 代码。
【问题讨论】:
-
自述文件建议以
make run开始示例。这行得通吗? -
没有。我现在还没有机会。稍后会尝试这样做
标签: erlang erlang-otp cowboy rebar3