Command 'generate' not understood or not applicable
Asked Answered
R

1

11

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

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, "."}]}}]}.
Redemption answered 18/2, 2012 at 17:53 Comment(1)
Just a note: fail_on_warning is deprecated (doesn't do anything in R16), and you should use warnings_as_errors.Bystander
L
10

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

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

{sub_dirs, ["rel"]}.

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

Lamont answered 18/2, 2012 at 23:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.