当我使用钢筋生成发布应用程序并尝试使用密钥控制台启动它时出现错误
{"init 终止于 do_boot",{'cannot load',pgsql,get_file}}。
在所有文件 app.src 和 reltool.config 中,我添加了 epgsql 应用程序。
应用程序.src:
{application, leasing,
[
{description, ""},
{vsn, "1"},
{registered, []},
{applications, [
kernel,
stdlib,
crypto,
ssl,
public_key,
epgsql,
amqp_client,
rabbit_common
]},
{mod, { leasing_app, []}},
{env, []}
]}.
reltool.config
{sys, [
{lib_dirs, ["../deps", "../apps"]},
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "leasingnode", "1",
[
kernel,
stdlib,
sasl,
crypto,
ssl,
public_key,
epgsql,
amqp_client,
rabbit_common,
leasing
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "leasingnode"},
{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, crypto, [{incl_cond, include}]},
{app, ssl, [{incl_cond, include}]},
{app, public_key, [{incl_cond, include}]},
{app, epgsql, [{incl_cond, include}]},
{app, amqp_client, [{incl_cond, include}]},
{app, rabbit_common, [{incl_cond, include}]},
{app, leasing, [{incl_cond, include}]}
]}.
{target_dir, "leasingnode"}.
{overlay, [
{mkdir, "log/sasl"},
{copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"},
{copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"},
{copy, "files/leasingnode", "bin/leasingnode"},
{copy, "files/leasingnode.cmd", "bin/leasingnode.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"}
]}.
当我从 erl shell 启动它时一切正常,但是当我生成发布时我有错误。当我关闭 epgsql 应用程序启动正常并且我看到所有应用程序(加密、ssl、public_key 已加载),但如果再次添加 epgsql 有错误。
我究竟做错了什么?