For some reason mix help doesn’t work outside the project directory, for install if create a directory on ~/Sandbox cd and try to run mix help it fails with
mix help
** (Code.LoadError) could not load /Users/config/config.exs
(elixir) lib/code.ex:1147: Code.find_file/2
(elixir) lib/code.ex:706: Code.eval_file/2
(mix) lib/mix/config.ex:220: Mix.Config.eval!/2
(mix) lib/mix/tasks/loadconfig.ex:38: Mix.Tasks.Loadconfig.load/1
(mix) lib/mix/tasks/loadconfig.ex:28: Mix.Tasks.Loadconfig.run/1
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:78: Mix.CLI.run_task/2
My env
MacOs
Darwin Machine.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe] [dtrace]
Elixir 1.8.2 (compiled with Erlang/OTP 21)
You have: Erlang/OTP 22 and Elixir 1.8.2 (compiled with Erlang/OTP 21). Please make sure Elixir is compiled with your current Erlang/OTP version. In some cases it could cause some problems.
Can you please tell us how did you installed Erlang and Elixir. If not using asdf version manager (which I know and use right now) please check if same happens in asdf.
I’m not sure why Elixir is trying to open config/config.exs. Did you run mix help inside your project? If so did you tried to run outside it or in newly generated one?
I have installed with brew, first installed brew install elixir and brew installed erlang 22
Yes I have run mix help inside a project it works, but I trying to create another project and all commands fail outside the project dir with the same error
Can you try running: find / -name .iex.exs 2>/dev/null and find / -name mix.exs 2>/dev/null. I’m assuming there’s one of those (probably mix.exs) in a location that you don’t expect. Possibly in /Users
Just a blind guess… find will do a case sensitive search, while the Mac OS filesystem will find MIX.exs when asked for mix.exs… Is there anything in /Users that is not your $HOME?
Thanks guys for your help, after cleanup all iex.exs and mix.exs and brew reinstall elixir it works, also I noticed that the elixir version was older (and this is not my desktop, just helping a friend here to fix his elixir installation ), at least he can start to get his hands dirty on some Elixir/Phoenix