Search code examples
elixirelixir-mix

Can't run function in elixir shell after installing with `mix deps.get`


I am trying to install mint with hex as directed in the README. However when I try to execute the example code I get an error:

9afa01708fef# iex  
Erlang/OTP 22 [erts-10.5] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Interactive Elixir (1.9.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> {:ok, conn} = Mint.HTTP.connect(:http, "httpbin.org", 80)
** (UndefinedFunctionError) function Mint.HTTP.connect/3 is undefined (module Mint.HTTP is not available)
    Mint.HTTP.connect(:http, "httpbin.org", 80)

What have I missed here?


Solution

  • Silly me. The solution was to start the shell with:

    iex -S mix