tonini/alchemist.el

Issue when using alchemist along with elixir version manger.

Closed this issue · 3 comments

Hello,

I am using alchemist along with kiex elixir version manager.

I have set the parameters to override the mix and elixir default setups in .emacs file. Please see below -


(setq alchemist-mix-command "/home/dev/.kiex/elixirs/elixir-1.3.2/bin/mix")

(setq alchemist-iex-program-name "/home/dev/.kiex/elixirs/elixir-1.3.2/bin/iex")

(setq alchemist-execute-command "/home/dev/.kiex/elixirs/elixir-1.3.2/bin/elixir")

(setq alchemist-compile-command "/home/dev/.kiex/elixirs/elixir-1.3.2/bin/elixirc")

When I try to execute C-c a i-p I am getting -

Command to run Elixir IEX : /home/dev/.kiex/elixirs/elixir-1.3.2/bin/iex -S mix phoenix.server

I get the error

-S : Could not find executable mix

Process Alchemist-IEx exited abnormally with code 1

I think the mix here should be replace with the proper path here.

I am using Alchemist version: 1.9.0snapshot (package: 20161122.2304).

Thank alots for your help.

I use the elixir version manager as well as alchemist and it works great. I use exec-path-from-shell to setup my environment, please give that a try: https://github.com/purcell/exec-path-from-shell

Hi @gausby,

After installation exec-path-from-shell. The errors related to $PATH seems to be fixed. But it's forcing to do mix hex.local even though I have done manually through the shell already. And when I confirm to do this mix hex.local emacs crashes.

Thanks

I did make it work adding other couple shell variables please see code below -

(require 'alchemist)
(exec-path-from-shell-initialize)
(exec-path-from-shell-copy-env "KIEX_HOME")
(exec-path-from-shell-copy-env "MIX_ARCHIVES")

Thank you @gausby