VoodooChild
VoodooChild

Reputation: 410

"iex -S mix" returns error server cannot start in Mac

I was trying to start up my mix project in elixir on Mac. The project works fine on CentOS. The error looks like this:

_build/dev/lib/<project_name>/ebin/Elixir.Mix.Tasks.Proddata.beam failed: :badfile
** (Mix) Could not start application exq: Exq.start(:normal, []) returned an error:
  shutdown: failed to start child: Exq.Manager
    ** (EXIT) {:connection_error, {:connection_error, :econnrefused}}

I tried updating my erlang version from brew, but it did not help. I have also tried cleaning dependencies. I am using

Erlang/OTP 18 [erts-7.0.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

and Elixir 1.0.5.

Upvotes: 3

Views: 580

Answers (1)

Jos&#233; Valim
Jos&#233; Valim

Reputation: 51429

Let's look at the errors:

_build/dev/lib//ebin/Elixir.Mix.Tasks.Proddata.beam failed: :badfile

This one means you are trying to invoke a task with the wrong name. Maybe you are calling "mix run proddata" and that will look for the task named Proddata but you may have named it differently. Use mix help to see which tasks are available.

** (Mix) Could not start application exq: Exq.start(:normal, []) returned an error: shutdown: failed to start child: Exq.Manager ** (EXIT) {:connection_error, {:connection_error, :econnrefused}}

It it saying it cannot connect to something. It seems that Exq.Manager needs Redis, so make sure Redis is running and you have configured it with the proper credentials.

Upvotes: 4

Related Questions