1

Erlang Version = Erlang/OTP 19

I have created a new erlang application using rebar3 Here are the steps:

rebar3 new app myapp
rebar3 compile
rebar3 new release myrel
cd myrel
rebar3 release
cd myrel/myapp/_build/default/rel/myapp/bin
./myapp start

I get the following error:

init terminating in do_boot (cannot expand $ERTS_LIB_DIR in bootfile) Crash dump is being written to: erl_crash.dump...done

Can someone please check what I am missing here? Thanks.

Sammy
  • 13
  • 3
  • Anything on this guys? I am not sure how to resolve this – Sammy Nov 29 '17 at 10:16
  • This seems related: https://stackoverflow.com/questions/41145677/cannot-expand-erts-lib-dir-in-bootfile – Stratus3D Nov 29 '17 at 23:08
  • This also seems like the same error in a different context: https://github.com/bitwalker/distillery/issues/235 – Stratus3D Nov 29 '17 at 23:13
  • Anyway this is because it is a relx issue. And the team is looking into it. It works from outside the bin directory. This is also raised in rebar issue. – Sammy Dec 01 '17 at 11:04
  • Possible duplicate of [Cannot expand $ERTS\_LIB\_DIR in bootfile](https://stackoverflow.com/questions/41145677/cannot-expand-erts-lib-dir-in-bootfile) – Jonke Dec 06 '17 at 22:07
  • It's not clear what you want to accomplish; don't do a release, do: rebar3 compile and then rebar3 tar -d false -i true for a standalone package. – Jonke Dec 06 '17 at 22:10

1 Answers1

0

If you do something like rebar3 as prod tar you should get a .tar.gz file that can be expanded on the server, with bin/myapp used to start/stop/attach. If you do something like rebar3 release, it'll build into _build/, with the start/stop script being in _build/default/rel/myapp/bin/myapp. Why are you using rebar3 new release myrel?

Stratus3D
  • 4,648
  • 4
  • 35
  • 67