Garrett Motzner
Garrett Motzner

Reputation: 3260

Elixir IEX stalls before showing prompt, and doesn't accept input

I recently tried to start iex. I typed iex in the shell (I tried several shells, just in case) and iex doesn't provide any prompt or the like. It just sits there, and if I type special keys like arrows they are escaped and output. If i type control-c it shows me the standard beam interrupt. I checked that iex was pointing to the right place and not oddly aliased, and it seems to be correct. How do I go about troubleshooting this?

I've tried uninstalling and re-installing elixir (but not erlang yet), but that didn't fix it. Are there any cached files I can check or delete?

Upvotes: 0

Views: 299

Answers (2)

Garrett Motzner
Garrett Motzner

Reputation: 3260

Ok, so turned out to be an erlang issue. After scouring my drive for erlang related files, I was able to get it to work after a re-install. Files I deleted before re-install:

  • ~/.erlang.cookie (the most likely candidate. contained a string similar to this: "AMVBSKDKEI", sadly, I don't have the exact string anymore)
  • the cached home-brew bottles (unlikely, but deleted them just to be sure)
  • rabbit mq (maybe not the issue, but it was an erlang dependent package I had left installed previously)

/usr/share/file/magic/erlang looks to be part of file(1) and not erlang directly. Left that alone and got it to work.

Upvotes: 0

Onorio Catenacci
Onorio Catenacci

Reputation: 15343

Look here. I'm specifically thinking of this part of the page:

The .erlang startup file

When Erlang/OTP is started, the system searches for a file named .erlang in the directory where Erlang/OTP is started. If not found, the user's home directory is searched for an .erlang file.

If an .erlang file is found, it is assumed to contain valid Erlang expressions. These expressions are evaluated as if they were input to the shell.

You'll want to see if there's an .erlang file anywhere; this would alter the startup of the Erl shell. That page also contains a bit of detail about environment variables that may affect the behavior of erl as well.

Upvotes: 0

Related Questions