gpt4 book ai didi

Erlang 发布 Rebar : What am I missing?

转载 作者:行者123 更新时间:2023-12-02 09:56:51 26 4
gpt4 key购买 nike

感谢这里的大力帮助,我正在构建我的第一个 Erlang 版本。还没有真正的代码,但我想了解它是如何完成的。我也咨询并遵循了 Martin 等人的一些网络教程。等,但似乎仍然缺少一些东西。

当我尝试开始发布时,我得到:

lloyd@Reliance:~/Programming/Erlang/learn$ sh rel/learn/bin/learn start
[: 129: Node 'learn@127.0.0.1' not responding to pings.: unexpected operator

在项目目录“learn”下我有:

apps  rebar  rebar.config  rel

在 rebar.config 中,我有:

{cover_enabled, true}.
{sub_dirs, ["rel","apps/zzz", "apps/zzz_lib"]}.

在 ...learn/apps 中,我有:

zzz  zzz_lib
据我所知,zzz 和 zzz_lib 中包含所有正确的内容。通过精益,我可以清理、编译和创建文档。

在 .../rel 中,我有:

files  learn  reltool.config

请参阅下面的 reltool.config。

我缺少魔法酱,但是什么呢?

非常感谢,

LRP

{sys, [
{lib_dirs, []},
{rel, "learn", "1",
[
kernel,
stdlib,
sasl
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "learn"},
{profile, embedded},
{excl_sys_filters, ["^bin/.*",
"^erts.*/bin/(dialyzer|typer)"]},
{app, sasl, [{incl_cond, include}]}
]}.

{target_dir, "learn"}.

{overlay, [
{mkdir, "log/sasl"},
{copy, "files/erl", "{{erts_vsn}}/bin/erl"},
{copy, "files/nodetool", "{{erts_vsn}}/bin/nodetool"},
{copy, "files/learn", "bin/learn"},
{copy, "files/app.config", "etc/app.config"},
{copy, "files/vm.args", "etc/vm.args"}
]}.

最佳答案

您的 retool.config 文件似乎缺少您编写的应用程序的一些条目。

第一部分应该看起来像这样。

{sys, [
{lib_dirs, ["../apps"]}, <--- point to where your applications are
{rel, "learn", "1",
[
<your application here> <---- add your application(s) here
kernel,
stdlib,
sasl
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "learn"},
{profile, embedded},
{excl_sys_filters, ["^bin/.*",
"^erts.*/bin/(dialyzer|typer)"]},
{app, <your application here>, [{incl_cond, include}]}, <-- and here
{app, sasl, [{incl_cond, include}]}
]}.

这是我使用 rebar 打包的来自 Erlang 和 OTP in Action 的示例应用程序。 https://github.com/tmcgilchrist/simple_cache

我遵循的总体布局是

  simple_cache
|-> apps
| \-> simple_cache
| |-> src
| \-> ebin
|
|-> rebar.config
|-> rel
|-> files
|-> reltool.config
\-> simple_cache

也宁可做

sh rel/learn/bin/learn start

使用

sh rel/learn/bin/learn console

并输入

application:which_applications().

其中应该列出一堆内容以及您的应用程序。例如

[{mysample_app,[],[]},
{sasl,"SASL CXC 138 11","2.1.10"},
{stdlib,"ERTS CXC 138 10","1.17.5"},
{kernel,"ERTS CXC 138 10","2.14.5"}]

关于Erlang 发布 Rebar : What am I missing?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6989747/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com