Erlang 与 Rebar 一起发布:我错过了什么?
感谢这里的大力帮助,我正在构建我的第一个 Erlang 版本。还没有真正的代码,但我想了解它是如何完成的。我也咨询并遵循了 Martin 等人的一些网络教程。等,但似乎仍然缺少一些东西。
当我尝试开始发布时,我得到:
lloyd@Reliance:~/Programming/Erlang/learn$ sh rel/learn/bin/learn start
[: 129: Node '[email protected]' 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"}
]}.
Thanks to much help here, I'm well on my way toward building my first Erlang release. No real code yet, but I want to understand how it's done. I've consulted and followed several web tutorials as well Martin et. al., but still seem to be missing something.
When I try to start my release I get:
lloyd@Reliance:~/Programming/Erlang/learn$ sh rel/learn/bin/learn start
[: 129: Node '[email protected]' not responding to pings.: unexpected operator
Under the project directory "learn" I have:
apps rebar rebar.config rel
In rebar.config, I have:
{cover_enabled, true}.
{sub_dirs, ["rel","apps/zzz", "apps/zzz_lib"]}.
In ...learn/apps, I have:
zzz zzz_lib
zzz and zzz_lib have all the right stuff in them so far as I can tell. From lean, I can clean, compile, and create docs.
In .../rel,I have:
files learn reltool.config
See reltool.config below.
I'm missing magic sauce, but what?
Many thanks,
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"}
]}.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您的 retool.config 文件缺少您编写的应用程序的一些条目。
第一部分应该看起来像这样。
以下是我使用 rebar 打包的来自 Erlang 和 OTP in Action 的示例应用程序。
https://github.com/tmcgilchrist/simple_cache
我遵循的总体布局
也不是
使用
和进入
其中应该列出一堆东西加上你的应用程序。
例如
Looks like your retool.config file is missing some entries for the application you have written.
The first part should look something like this.
Here is a sample application from Erlang and OTP in Action that I packaged up using rebar.
https://github.com/tmcgilchrist/simple_cache
The general layout I follow is
Also rather that doing
use
and enter
Which should list a bunch of things plus your application.
eg