命令'生成'不了解或不适用 [英] Command 'generate' not understood or not applicable

查看:147
本文介绍了命令'生成'不了解或不适用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行rebar生成来生成一个erlang钢筋项目的发行版,并得到以下错误。任何想法我做错了什么?

I am trying to run rebar generate to generate a release for an erlang rebar project and getting the following error. Any ideas what I am doing wrong?

./rebar generate
Command 'generate' not understood or not applicable

我在OSX上使用erlang版本Erlang R14B03及以下是我的rebar.conf

I am on OSX with erlang version Erlang R14B03 and below is my rebar.conf

{lib_dirs, ["deps"]}.
{sub_dirs, ["rel"]}.
{deps, [
       {folsom, ".*", {git, "git://github.com/boundary/folsom", "master"}}
       ]}.

{require_otp_vsn, "R14|R15"}.

{erl_opts, [
            fail_on_warning, 
            debug_info, 
            warn_missing_spec
       ]}.

{clean_files, ["*.eunit", "ebin/*.beam", "rel/graphsom"]}.

{cover_enabled, true}.

{eunit_opts, [verbose, {report, {eunit_surefire, [{dir, "."}]}}]}.


推荐答案

您收到此错误是因为钢筋无法找到发布。你应该检查你是否在某个地方有 reltool.config c> c> c> c#c​​>知道它。

You are getting this error because rebar is unable to find a release. You should check if you have reltool.config somewhere and rebar knows about it.

如果没有发布,您可以创建一个新的:

If no release exists, you can create a new one:

mkdir rel
cd rel
../rebar create-node nodeid=YOUR_NODE_ID

最后,您需要告诉 rebar 关于发布。在您的情况下,您已将以下内容添加到rebar.config中:

Lastly, you need to tell rebar about the release. In your case, you already have the following added to rebar.config:

{sub_dirs, ["rel"]}.

这应该允许generate命令构建一个新的版本。

This should allow the generate command to build a new release.

这篇关于命令'生成'不了解或不适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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