2012-05-07 113 views
3

我一直在尝试使用钢筋设置一个简单的Erlang应用程序,但无法让它工作。我也跟着上http://skeptomai.com/?p=56的指示信,当我跑./rebar -v generate,我得到这个错误:下面https://bitbucket.org/basho/rebar/wiki/ReleaseHandling钢筋:“释放mynode使用非现有的应用程序myNode”

==> Entering directory `/home/adam/erlang-test3/testing-rebar/apps/myapp' 
WARN: 'generate' command does not apply to directory /home/adam/erlang-test3/testing-rebar/apps/myapp 
==> Leaving directory `/home/adam/erlang-test3/testing-rebar/apps/myapp' 
==> Entering directory `/home/adam/erlang-test3/testing-rebar/rel' 
==> rel (generate) 
{"init terminating in do_boot","Release mynode uses non existing application mynode"} 

Crash dump was written to: erl_crash.dump 
init terminating in do_boot (Release mynode uses non existing application mynode) 

,我收到了类似的错误。以下http://www.metabrew.com/article/erlang-rebar-tutorial-generating-releases-upgrades时,我得到:

{"init terminating in do_boot",{undef,[{dummy_proj,start,[]},{init,start_it,1},{init,start_em,1}]}} 

我怎么螺纹钢工作?我的二郎版本是Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

回答

5

我也开始学习二郎+螺纹钢和我前一段时间有同样的问题和 我想你有问题,你reltool.config文件

  1. 添加路径lib_dirs。我有{lib_dirs, ["../../", "../deps/"]}
  2. 将您的应用程序添加到应用程序列表。在我而言,这是 - {app, MY_APP_NAME, [{incl_cond, include}]}

更新: 你必须应用重新命名。 F.E.到erlangtest1。 我的工作reltool.config

{sys, [ 
     {lib_dirs, ["../../"]}, 
     {erts, [{mod_cond, derived}, {app_file, strip}]}, 
     {app_file, strip}, 
     {rel, "exemplar", "1", 
     [ 
     kernel, 
     stdlib, 
     sasl, 
    erlangtest1 
     ]}, 
     {rel, "start_clean", "", 
     [ 
     kernel, 
     stdlib 
     ]}, 
     {boot_rel, "exemplar"}, 
     {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, erlangtest1, [{incl_cond, include}]} 
     ]}. 

{target_dir, "exemplar"}. 

{overlay, [ 
      {mkdir, "log/sasl"}, 
      {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"}, 
      {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"}, 
      {copy, "files/exemplar", "bin/exemplar"}, 
      {copy, "files/exemplar.cmd", "bin/exemplar.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"} 
      ]}. 
+1

我有 “..” 在lib_dirs,因为reltool.config是$ PROJ_ROOT /相对。我的应用程序位于应用程序列表中,其中包含incl_cond和include选项。 –

+0

尝试在你的lib_dirs中添加“../../”。 – kolchanov

+1

它没有帮助。 –

相关问题