Running a mix application in iex with the --werl option?


When trying to run “iex --werl -S mix.exs”, the werl shell starts but disappears instantly. I would like to make it work so I’m in a console with autocompletion and proper handling of utf8.

Is there a way to run mix.exs in the werl shell ?


You do not run mix.exs but mix. I can’t test right now, but in theory the command iex --werl -S mix should do it.

@NobbZ is correct you can run mix --werl -S mix.

If the werl window is closing instantly, I find it’s often a compile error in my code. These kind of get hidden when using werl as the window closes before you get chance to view the errors. I’m guessing this is because the errors are written out in the werl window, however the window is closed when the iex session ends (which happens on a compile error).

Ouch! I’ve been running iex -S mix in the shell and mistakenly added the “.exs” extension when trying it with --werl. Sorry for that newbie question, I should have reviewed my typing before posting. @NobbZ, @swelham, thanks for your replies.

No problem, I have done the same thing many times before - habit of hitting tab a lot!