我尝试从Cowboy示例制作Cookie示例,但我得到下一个错误:
..................................................
Finished in 16.335 seconds
770 tests, 0 failures
ERLC cookie_app.erl cookie_sup.erl toppage_handler.erl
DTL toppage.dtl
{"init terminating in do_boot",{undef,[{merl,term,[<<237 bytes>>],[]},{erlydtl_beam_compiler,string_ast,2,[{file,"src/erlydtl_beam_compiler.erl"},{line,966}]},{lists,mapfoldl,3,[{file,"lists.erl"},{line,1352}]},{erlydtl_beam_compiler,body_ast,3,[{file,"src/erlydtl_beam_compiler.erl"},{line,685}]},{erlydtl_beam_compiler,compile_to_binary,3,[{file,"src/erlydtl_beam_compiler.erl"},{line,195}]},{erlydtl_compiler,compile,1,[{file,"src/erlydtl_compiler.erl"},{line,206}]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,657}]},{erl_eval,eval_lc1,6,[{file,"erl_eval.erl"},{line,683}]}]}}
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
make: * [ebin/cookie.app] Error 1
有人遇到同样的麻烦吗?怎么了?
答案 0 :(得分:0)
我之前没有使用过牛仔。根据错误消息,merl应用程序不包括在内。试试rebar delete-deps
rebar clean
rebar get-deps
然后再次编译牛仔。
答案 1 :(得分:0)
正如所料,问题的根源在于依赖的路径。我将ebin
和src
个文件夹从~/cowboy/examples/cookie/deps/erlydtl/deps/merl
移至/usr/local/lib/erlang/lib/merl
,然后成功构建了应用。