0

一个基于 Webmachine 和 ErlyDtl 的简单应用程序,当我使用 ./start 启动它时它可以工作。如果我尝试使用钢筋进行发布,那么它会启动,但是当我执行请求时,它将失败并出现以下错误。我试图包含编译器......仍然没有帮助其他东西丢失但不知道如何检测。

{error,
{error,undef,
    [{erlydtl_runtime,find_value,[param,[{param,"Slartibartfast"}]],[]},
     {index_dtl,render_internal,4,[]},
     {index_dtl,render,2,[]},
     {web_resource,to_html,2,[{file,"src/web_resource.erl"},{line,13}]},
     {webmachine_resource,resource_call,3,
         [{file,"src/webmachine_resource.erl"},{line,183}]},
     {webmachine_resource,do,3,
         [{file,"src/webmachine_resource.erl"},{line,141}]},
     {webmachine_decision_core,resource_call,1,
         [{file,"src/webmachine_decision_core.erl"},{line,48}]},
     {webmachine_decision_core,decision,1,
         [{file,"src/webmachine_decision_core.erl"},{line,555}]}]}}

这是我的 reltool.config

{sys, [
   {lib_dirs, ["../apps", "../deps"]},
   {erts, [{mod_cond, derived}, {app_file, strip}]},
   {app_file, strip},
   {rel, "numbes", "1",
    [
     web,
     cowboy,
     crypto,
    ranch,
    kernel,
    mochiweb,
    compiler,
    webmachine,
     stdlib,
     inets,
     sasl
    ]},
   {rel, "start_clean", "",
    [
     kernel,
     stdlib
    ]},
   {boot_rel, "numbes"},
   {profile, embedded},
   {incl_cond, exclude},
   {excl_archive_filters, [".*"]}, %% Do not archive built libs
   {excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
                       "^erts.*/(doc|info|include|lib|man|src)"]},
   {excl_app_filters, ["\.gitignore"]},
   {app, sasl,   [{incl_cond, include}]},
   {app, stdlib, [{incl_cond, include}]},
   {app, kernel, [{incl_cond, include}]},
   {app, cowboy, [{incl_cond, include}]},
   {app, crypto, [{incl_cond, include}]},
   {app, inets, [{incl_cond, include}]},
   {app, mochiweb, [{incl_cond, include}]},
   {app, ranch, [{incl_cond, include}]},
   {app, compiler, [{incl_cond, include}]},
   {app, webmachine, [{incl_cond, include}]},
   {app, web, [{incl_cond, include}]}
  ]}.

{target_dir, "numbes"}.

{overlay, [
       {mkdir, "log/sasl"},
       {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
       {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
       {copy, "files/numbes", "bin/numbes"},
       {copy, "files/numbes.cmd", "bin/numbes.cmd"},
       {copy, "files/start_erl.cmd", "bin/start_erl.cmd"},
       {copy, "files/install_upgrade.escript", "bin/install_upgrade.escript"},
       {copy, "files/sys.config", "releases/\{\{rel_vsn\}\}/sys.config"},
       {copy, "files/vm.args", "releases/\{\{rel_vsn\}\}/vm.args"}
      ]}.

任何帮助将不胜感激。

4

1 回答 1

1

查看日志文件我唯一能知道的是模块 erlydtl_runtime 不包含在版本中,或者至少不包含在搜索路径中。

即使缺少模块,应用程序也会启动是正常的,默认情况下,应用程序只会在第一次调用模块时尝试加载模块。

于 2013-02-11T05:32:52.627 回答