small medium large xlarge

03 Jun 2013, 18:00
Jim Menard (6 posts)

Following the instructions in 11.10 I run mix escriptize. It generates the executable issues but when I run it I see:

~/src/issues$ ./issues elixir-lang elixir
** (ArgumentError) argument error
    :ets.lookup(:ibrowse_lb, {'',443})
    src/ibrowse.erl:317: :ibrowse.send_req/6
    /Users/jimm/src/issues/deps/httpotion/lib/httpotion.ex:82: HTTPotion.request/5
    /Users/jimm/src/issues/lib/issues/github_issues.ex:8: Issues.GithubIssues.fetch/2
    /Users/jimm/src/issues/lib/issues/cli.ex:44: Issues.CLI.process/1
    escript.erl:277: :escript.start/1
03 Jun 2013, 18:00
Jim Menard (6 posts)

When I run from within iex (iex -S mix), I can call Issues.main([“elixir-lang”, “elixir”]) and it works normally.

I’m on a Mac.

Erlang R16B (erts-5.10.1) [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (0.9.1) - press Ctrl+C to exit (type h() ENTER for help)

03 Jun 2013, 21:27
Alvin Lai (1 post)

Try adding:

:ssl.start() :ibrowse.start()

at the beginning of the fetch method in Issues.GithubIssues

04 Jun 2013, 13:29
Jim Menard (6 posts)

That did it. Thanks, Alvin.

13 Jun 2013, 20:28
Brian Palmer (1 post)

I was stumped on this too until I found this thread. Can anybody explain why this is necessary? It seems like the binary generated by mix escriptize is ignoring the application section of mix.exs, where :httpotion is normally started.

You must be logged in to comment