Mix is a build tool that provides tasks for creating, compiling, testing Elixir projects, as well as handle dependencies, and more.
Questions tagged [elixir-mix]
339 questions
3
votes
1 answer
Phoenix Framework: mix test fails with argumenterror on new app
So, I'm brand new to Elixir and Phoenix. I've done a hello world app. Followed one guy's blog app. Followed the Phoenix Framework initial steps. So far, so good.
Tonight, however, I have something new.
Everytime I run mix test, I get the…

Art
- 781
- 4
- 13
3
votes
1 answer
What are the steps to successfully run Ranch on windows?
Please what steps do we need to take to get Ranch working successfully on windows?
There is a very instructive set of examples in a great blog series which i am trying to follow here:…

Charles Okwuagwu
- 10,538
- 16
- 87
- 157
3
votes
1 answer
Forcing package update with Mix
When I use the following command
mix deps.update --all
mix will use locally cached packages if the version of a package has not been changed in the mix.ex file. So the question is, how can I force mix not to use the cached version and download it…

NoDisplayName
- 15,246
- 12
- 62
- 98
3
votes
1 answer
Testing elixir release build with exrm
I am building phoenix application with exrm.
Good practice suggests, that I should make tests against the same binary, I'll be pushing to production.
Exrm gives me the ability to deploy phoenix on machines, that don't have Erlang or Elixir…

tkowal
- 9,129
- 1
- 27
- 51
3
votes
1 answer
Expect-like functionality to IO.gets?
For example, if I wanted to automate authorizing a hex user. Something like
mix hex.user auth
#!/usr/bin/expect -f
expect "Username: "
send -- "$HEX_USERNAME\r"
expect "Password: "
send -- "$HEX_PASSWORD\r"
mix hex.user auth asks for Username: and…

user3248046
- 31
- 2
3
votes
2 answers
Suppress stderr while running Mix Test in Elixir
I'm working with several external processes in my application. During tests the stderr output of several of these is output inline with my test messages and results. I can do this:
mix test --trace 2> error.log
However, when I do, I lose all my…

Daniel C
- 1,332
- 9
- 15
3
votes
1 answer
Mix compiliation fails when compiling Ecto
In Elixir:
When trying to compile the dependencies for Ecto, I run into the following error with Mix and poolboy:
>mix compile
** (Mix) The application poolboy specified a non Semantic Version `cat VERSION`. Mix can only match the requirement ~>…

seadynamic8
- 177
- 7
3
votes
1 answer
Elixir mix compilation priority
Is is possible to specify compilation priority for modules? Lets say I have two files a.ex and b.ex and I want to compile b.ex first while using mix compile. Is it possible?

Jack Daniel's
- 2,583
- 22
- 28
3
votes
1 answer
Elixir .exs script "module is not loaded and could not be found" when using Mix
I have a .exs script in my root directory that I want to be able to execute on the command line like elixir my_script.exs. My script was working before I initialized Mix in my project but now it does not work. I can see that Mix is placing the .beam…

Stratus3D
- 4,648
- 4
- 35
- 67
2
votes
2 answers
Elixir `mix` command throws error `could not call Module.put_attribute/3 because the module Helloworld.MixProject is already compiled`
Setup new project with command mix new project_name it setup everything without any
error or warning message, cd to project and ran command iex -S mix it throws error
lib/helloworld.ex
defmodule Helloworld do
@moduledoc """
Documentation for…

Bhanwarlal Chaudhary
- 402
- 6
- 20
2
votes
0 answers
Ecto - How to populate List of IDs in Schema Elixir Postgres
I'm getting response from Ecto Schema query with joins multiple tables.
Here is my query:
query =
from(
item in ItemSchema,
join: item_cat in ItemCategorySchema,
on: item.item_category_id ==…

hassan
- 57
- 7
2
votes
0 answers
Constant function returning empty list: spec is supertype of success typing
I have recently started learning Elixir, and while playing around with typespecs within a Mix project I stumbled upon some Dialyzer warnings I don't quite understand; the following code is a fairly minimal example:
defmodule Foo do
@opaque bar ::…

verglasz
- 31
- 5
2
votes
1 answer
How to pass command line arguments to Mix Release built
I am trying to pass command-line arguments to my elixir release. I have built the release using
MIX_ENV=prod mix release
Now, Am not able to pass any command-line arguments with the start command.
_build/prod/rel/prod/bin/prod start arg1…

Owais Qayum
- 59
- 7
2
votes
1 answer
Escript files and .gitignore
I'm going through the Programming Elixir book and currently got to the point of creating a little console using mix escript.build (similar to this documentation example: https://hexdocs.pm/mix/Mix.Tasks.Escript.Build.html#module-example)
Now, it…

Iarek
- 1,220
- 15
- 40
2
votes
2 answers
ssl.cipher_suites/0 is undefined or private, use cipher_suites/2,3 instead (ssl 10.4.1) :ssl.cipher_suites()
** (UndefinedFunctionError) function :ssl.cipher_suites/0 is undefined or private, use cipher_suites/2,3 instead
(ssl 10.4.1) :ssl.cipher_suites()
(hackney 1.15.2) /Users/naveen/NAV/moviematch/deps/hackney/src/hackney_ssl.erl:77:…

navyad
- 3,752
- 7
- 47
- 88