4

Rebar を使用して簡単な Erlang アプリをセットアップしようとしましたが、うまく動作しません。http://skeptomai.com/?p=56の指示に従いましたが、 を実行すると、次の./rebar -v generateエラーが表示されます。

==> 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)

https://bitbucket.org/basho/rebar/wiki/ReleaseHandlingに従うと、同様のエラーが発生します。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のバージョンはErlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

4

1 に答える 1

6

私も erlang + rebar を学び始めましたが、しばらく前に同じ問題があり、reltool.configファイル に問題があると思います

  1. へのパスを追加しますlib_dirs。私は持っている{lib_dirs, ["../../", "../deps/"]}
  2. アプリをアプリ リストに追加します。私の場合、これは -{app, MY_APP_NAME, [{incl_cond, include}]}

更新: アプリの名前を変更する必要があります。Fe から 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"}  
          ]}.  
于 2012-05-10T06:47:31.007 に答える