0

Trying to launch alchemist-iex-run in emacs and getting this error:

/opt/homebrew/Cellar/elixir/1.12.1/bin/elixir: line 230: exec: erl: not found
Process Alchemist-IEx exited abnormally with code 127

However, run-erlang (erlang-shell) works fine. which erl results /opt/homebrew/bin/erl. And erl runs in eshell.

Why is the executable not found with alchemist-iex-run?

Gavin
  • 183
  • 8
  • The normal macOS comment is that it does not read the environment including $PATH from, your startup shell scripts you need to set $PATH explicitly in your emacs-init or look at packages like exec-path-from-shell – mmmmmm Jun 26 '21 at 08:41
  • @mmmmmm The path is set explicitly and includes `/opt/homebrew/bin`. That's why it's surprising that I get the `exec: erl: not found` error. – Gavin Jun 27 '21 at 10:31
  • How do you set the path? – mmmmmm Jun 27 '21 at 10:36
  • To ensure homebrew paths are added, in init.el: `(add-to-list 'exec-path "/opt/homebrew/bin)` and `(add-to-list 'exec-path "/opt/homebrew/sbin)` – Gavin Jun 27 '21 at 13:50
  • Those two examples iun you comment are missing a " is that a mis copy or is that the exact code – mmmmmm Jun 27 '21 at 15:25
  • That's a typo. Closing " is present in the file. – Gavin Jun 27 '21 at 16:36
  • To check your path in the subprocess run `(call-process "env" nil t)` in an emacs lisp buffer – mmmmmm Jun 27 '21 at 16:55
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/126935/discussion-between-gavin-and-mmmmmm). – Gavin Jun 28 '21 at 07:56

0 Answers0