使用 `mix deps.get` 安装后,运行 无法在 elixir shell 中运行
Can't run function in elixir shell after installing with `mix deps.get`
我正尝试按照 README 中的指示安装 mint
和 hex
。但是,当我尝试执行示例代码时出现错误:
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)
我错过了什么?
傻我。解决方案是启动 shell 与:
iex -S mix
我正尝试按照 README 中的指示安装 mint
和 hex
。但是,当我尝试执行示例代码时出现错误:
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)
我错过了什么?
傻我。解决方案是启动 shell 与:
iex -S mix