[erlang-questions] "Automatic" recompile app from a console

Garrett Smith <>
Thu Jan 31 22:25:33 CET 2013

On Thu, Jan 31, 2013 at 3:08 PM, John Kemp <> wrote:
> Hi,
> I have been writing an application using rebar to build the app. I run the
> server and open a console. I then change the source code and apparently I
> need to leave the console, 'make rel' and restart the app and the console.
> I'm sure there's a better way to do what I'm doing.
> One project I found is https://github.com/rustyio/sync, but this did not
> (yet) work for me according to the instructions.
> How can I have my rebar (or just Erlang) app automatically recompile ('make
> rel') when one of the source files changes, or run a command from within the
> console to do this?

You're asking about a completely different workflow, but on the
outside chance you're simply looking for a streamlined way to
integrate the shell with your programming, this is what I use:

- Edit and compile source explicitly (I have a key binding to run
"make" in Emacs, but I'm sure most editors have an easy equivalent)

- Let mochiweb's reloader, which is started using the "-s reloader"
option, automatically reload the modified beams

I *live* in the Erlang shell during development, always using this
workflow. When I watch others constantly closing and restarting the
Erlang shell in between changes, I wonder how on earth they get
anything done :)


More information about the erlang-questions mailing list