我无法破译这个错误消息,当我点击使用Cowboy创建的简单终端时,我得到了这个错误消息。我用牛仔创建了一个简单的应用程序(https://github.com/overture8/cow_app),然后使用rebar3 shell
启动应用程序(不知道这是否正确?)。无论如何,我打的端点时收到此错误:使用Erlang Cowboy应用程序获得500响应
Error in process <0.232.0> with exit value:
{[{reason,undef},
{mfa,{hello_handler,init,3}},
{stacktrace,
[{hello_handler,init,
[{tcp,http},
{http_req,#Port<0.7138>,ranch_tcp,keepalive,<0.232.0>,<<"GET">>,
'HTTP/1.1',
{{127,0,0,1},49651},
<<"127.0.0.1">>,undefined,8010,<<"/">>,undefined,<<>>,
undefined,[],
[{<<"host">>,<<"127.0.0.1:8010">>},
{<<"connection">>,<<"keep-alive">>},
{<<"cache-control">>,<<"max-age=0">>},
{<<"upgrade-insecure-requests">>,<<"1">>},
{<<"user-agent">>,
<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36">>},
{<<"accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8">>},
{<<"dnt">>,<<"1">>},
{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},
{<<"accept-language">>,
<<"en-GB,en;q=0.8,en-US;q=0.6,fr;q=0.4">>}],
[{<<"connection">>,[<<"keep-alive">>]}],
undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,
undefined},
[]],
[]},
.
.
.
也许我只是在做一些完全错误的 - 这是我使用Erlang的第一次经历。
任何帮助将不胜感激。
忘了提及 - 我使用Mac并使用'brew install erlang'安装了Erlang。我安装的版本是“Erlang/OTP 19 [erts-8.0.2]”。 – overture8