Rebar:“Release mynode uses non existing application mynode” [英] Rebar: "Release mynode uses non existing application mynode"

查看:209
本文介绍了Rebar:“Release mynode uses non existing application mynode”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用Rebar设置一个简单的Erlang应用程序,但无法使其工作。我按照 http://skeptomai.com/?p=56 上的说明来写信,当我运行 ./ rebar -v生成时,我收到这个错误:

I've been trying to set up a simple Erlang app using Rebar but can't get it to work. I followed the instructions on http://skeptomai.com/?p=56 to the letter, and when I run ./rebar -v generate, I get this error:

==> 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-generated-releases-updates-updates ,我得到:

I get a similar error when following https://bitbucket.org/basho/rebar/wiki/ReleaseHandling. When following http://www.metabrew.com/article/erlang-rebar-tutorial-generating-releases-upgrades, I get:

{"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]

How do I get rebar to work? My Erlang version is Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]

推荐答案

我也开始学习erlang +钢筋,我有同样的问题之前和
我想你在你的 reltool.config 文件中有问题

I also started to learn erlang + rebar and I had the same problem some time ago and I suppose you have problem in your reltool.config file


  1. 将路径添加到 lib_dirs 。我有 {lib_dirs,[../../,../ deps /]}

  2. 添加您的应用程式列入应用程式在我的情况下,这是 - {app,MY_APP_NAME,[{incl_cond,include}]}

  1. Add path to lib_dirs. I have {lib_dirs, ["../../", "../deps/"]}
  2. Add your app to app list. In my case this is - {app, MY_APP_NAME, [{incl_cond, include}]}

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

Update: You have to rename you app. F.e. to erlangtest1. My working 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"}  
          ]}.  

这篇关于Rebar:“Release mynode uses non existing application mynode”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆