Questions tagged [elixir-iex]

Elixir’s interactive shell.

iex is Elixir’s interactive shell, which can be used to interactively run Elixir code from the command line.

150 questions
0
votes
1 answer

How to quit after run IO.read(:stdio, :all) in the Elixir iex?

I need test some input data flow, and use 'IO.read', but after entering data i can't exit from this mode, CTRL-Z/X/C/D doesn't help (it terminates the whole iex). So how correct EOF command for this mode? Thanks!
0
votes
1 answer

Why my receive method is stopping my iex?

I wrote the following code on my iex terminal and after that it does not respond anymore, the terminal just stop, like it was expecting something else. What is actually happened? receive do {:hello, msg} -> msg {:world, msg} ->…
Yago Azedias
  • 4,480
  • 3
  • 17
  • 31
0
votes
0 answers

Error while sending email using Swoosh

I am trying to write an Elixir code which sends an email using the Swoosh library. For some reason, I keep getting the following error:- {:error, {:retries_exceeded, {:network_failure, 'smtp.gmail.com', {:error, :timeout}}}} This is what my…
Sh4dy
  • 143
  • 2
  • 15
0
votes
2 answers

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…
Garrett Motzner
  • 3,021
  • 1
  • 13
  • 30
0
votes
0 answers

Can't run iex globally. A Mix error comes up

I am very new to Elixir, and I am trying to run iex. When I type 'iex' in the command line, I get the following error: Erlang/OTP 20 [erts-9.0.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async->threads:10] [hipe] [kernel-poll:false] [dtrace] **…
0
votes
1 answer

IEx block with sudo and System.cmd("mount")

Some precision : $> iex --version Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] IEx 1.4.4 $> mix --version Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:8:8] [ds:8:8:10]…
0
votes
1 answer

How can I output raw text properly formatted for reading and filing in Elixir?

I need the output of the command below, ie "* master\n remotes/origin/HEAD -> origin/master\n remotes/origin/master\n" to be output for reading. iex(26)> System.cmd "git", ["-C", "/home/vonhabsi/workpad/Cuis/.git","branch","-a"] {"* master\n …
vfclists
  • 19,193
  • 21
  • 73
  • 92
0
votes
0 answers

How can I use IEx.pry without mix

I know you can get a breakpoint using IEx.pry when you run an application like iex -S mix. I am working on some elixir exercises that do not use mix. I run it using elixir myfile.exs. How can I run this file using IEx so I can use IEx.pry…
Sam
  • 1,102
  • 11
  • 22
0
votes
1 answer

r(module_name) not reloading @doc in iex

I am updating my @doc while in iex> to test how it looks. The problem I am coming up against is that I have to exit iex to view the updated @doc documentation. Is there a way to reload the modules @doc variables when using r()? iex -S mix iex> h…
David Gross
  • 1,863
  • 10
  • 14
0
votes
1 answer

How to input :binary_id in iex command line?

I am writing an application in Elixir with Postgres as the data store. In Ecto, I defined this entity: defmodule MyModule.User do use Ecto.Schema import Ecto.Changeset @primary_key {:id, :binary_id, autogenerate: true} schema "users" do …
Adam Libuša
  • 685
  • 7
  • 24
0
votes
1 answer

Update elixir to include bug fixes?

I'm relatively new to programming, however I have a little project I'm working on in elixir and in said project I want IEx to have a custom prompt. I am able to do so but as many of you may be aware there is a bug with this where the custom prompt…
0
votes
1 answer

How can I make running iex with `-S mix` always for specific project?

This question is caused by Alexey Matushkin answer here. How can I make iex always run with -S mix option, and only for specific project? Maybe there is something I can place in .iex.exs which I overlooked... UPDATED I want to run iex only from…
Alex Antonov
  • 14,134
  • 7
  • 65
  • 142
0
votes
1 answer

how can we increase the buffer size of the erlang emulator (werl on windows)

Please how can we increase the message buffer size of the Erlang Emulator, particularly on Windows (i.e. the WERL tool) It seems to be limited to 999 The Same affects IEx. Thanks
Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157
-1
votes
1 answer

How do I read json file with a loop and insert variables into locator?

How to insert a variable into an address for reading a JSON file. It is supposed to be something like this. But this doesn't work. The first part works but that is a sample of how it is supposed to work. The working part is called…
-4
votes
1 answer

How do i run a db select and get the result in iex?

In elixir iex, I want to know the basic steps. 1.If i had the module and How to import it. 2.I want run from l in '' where and get the map. Im tried to import with import Ecto.Query, and then I was running some like from l in '' where, i got this…
Carey
  • 307
  • 2
  • 5
  • 13
1 2 3
9
10