Cannot start iex on windows command line or git bash

I just installed the elixir through chocolate on my Windows 7 machine. In the root of the C directory inside the admin command line, I ran:

c:\> cinst elixir 

This has been successfully installed by erlang and elixir - v.1.0.4. Nothing succeeded, all reports of success. Then I restarted the command line and ran

 c:\> iex.bat 

I get an error message:

'iex.bat' is not recognized as an internal or external command, operating program, or batch file.

I usually run mac, so I'm pretty ignorant when it comes to Windows. Also tried running iex in git bash, but no luck. How to start iex?

+7
elixir chocolatey
source share
1 answer

Neither Erlang nor Elixir are automatically added to your Chocolatey path. So make sure you add the Erlang and Elixir bin directory to your path. Since you mention that you are really not used to Windows, try running this on the command line before trying to execute iex.bat:

 SET PATH=C:/"Program Files"/erl6.4/bin;C:/Elixir/bin;%PATH% 

Obviously, you will want to set up the path where you installed something.

Oh and you want to run iex.bat. I don't think that iex.bat will start from the git bash prompt, but I can't remember the last time I tried it.

EDIT:

For Elixir 1.0.5, you want to change the path above to use C: / "Program Files" / erl 7.0 / bin (Erlang / OTP 18.0) if you installed from Chocolatey.


EDIT:

Elixir is now added to the Windows path (from Elixir 1.2.4) through the Chocolatey Nuget installer. Erlang still needs to be added manually; it depends on the Erlang Windows installer. Also @manveru's comment below does not apply. ielixir.exe is a gasket that was applied at some point to try to get around path problems. It is currently discontinued for several versions.

+5
source share

All Articles