Search code examples
erlangrebar

Command 'escriptize not understood or not applicable


When I run ./rebar get-deps compile escriptize, it fails with the following:

WARN:  'escriptize' command does not apply to directory /path/to/foo
Command 'escriptize' not understood or not applicable

What have I forgotten?


Solution

  • Even though you're generating an escript package, rebar still needs the foo.app file. If you didn't use ./rebar create-app appid=foo to create your "application", you'll need to create one by hand:

    {application, foo,
     [
      {description, ""},
      {vsn, "1"},
      {registered, []},
      {applications, [
                      kernel, stdlib
                     ]},
      {env, []}
     ]}.
    

    Note that you might need to ./rebar compile again in order to generate the foo.app file before ./rebar escriptize will generate the script correctly.