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
5
votes
1 answer
Why do I get this error `(Mix) Could not find an SCM for dependency :cowboy `
I have a elixir project and below is the mix configuration file:
defmodule MyFirstApp.Mixfile do
use Mix.Project
def project do
[
app: :my_first_app,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env ==…

Joey Yi Zhao
- 37,514
- 71
- 268
- 523
5
votes
2 answers
Setting MIX_ENV in Heroku for Phoenix Framework
I've instantiated two Heroku apps successfully: my-app-prod and my-app-test. There are specific environment variables I've configured in the Heroku app settings. I am using the standard configuration files in Phoenix: config.exs, test.exs, prod.exs,…

sheldonkreger
- 858
- 1
- 9
- 25
5
votes
1 answer
ExUnit - run all tests stored in a custom directory (not tests/)
I want to have two separate sets of unit tests in my Elixir project that I can run separately with different ExUnit configurations. I am working on an ExUnit formatter and I am trying to write unit tests for it. In order to test it I figured I would…

Stratus3D
- 4,648
- 4
- 35
- 67
4
votes
1 answer
How to start an Erlang shell in a mix project setup?
I have a project written in both Elixir and Erlang (lib and src directories) which I compile using mix (just like described here).
How do I start an Erlang interactive shell with all my Erlang modules loaded?
Basically something like iex -S mix for…

pieca
- 2,463
- 1
- 16
- 34
4
votes
2 answers
Elixir Mix release - How can I copy extra files into the tarball of Phoenix app?
I wrote the following mix.exs to release my Phoenix application as a tar ball, referring to the “Steps” section of the Mix.Tasks.Release documentation.
defmodule MyApp.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
…

Tsutomu
- 4,848
- 1
- 46
- 68
4
votes
5 answers
The task "docs" could not be found. Did you mean "do"?
How to generate documentation for mix project? How it can do it?
The procedure for working with the Elixir mix-project:
I generate a project by mix new greeter command.
I add a block of comments in the greeter.ex file.
I add dependencies to the…

Anatolii Kosorukov
- 900
- 6
- 22
4
votes
1 answer
How can one fix error compiling bcrypt_elixir or argon_elixir on windows?
I am trying to create a web application with authentication in elixir/phoenix. I have been running into errors with nmake while trying to compile either argon_elixir or bcrypt_elixir with mix deps.compile or mix phx.server.How do I
configure nmake…

Kinyugo
- 429
- 1
- 4
- 11
4
votes
1 answer
Custom mix task not loading test environment
I am attempting to put together a custom mix task that will execute the mix test task in a specialized manner. My mix task is mix test.pretty.
So far, I've written the world's most basic custom mix task:
defmodule Mix.Tasks.Test.Pretty do
use…

jaydel
- 14,389
- 14
- 62
- 98
4
votes
1 answer
How to install earlier version of Phoenix with Mix CLI?
Can't install earlier Phoenix version (eg. 1.3.4) than latest stable (eg. 1.4.0) with mix archive.install command.
Solution not achieved according to this thread:
https://github.com/phoenixframework/phoenix/issues/2991
$ mix archive.install hex…

AR Rose
- 361
- 4
- 17
4
votes
1 answer
ets.lookup_element(Ecto.Registry, nil, 3) in customized mix task
Created customized task under lib/mix/tasks/load_mnemonics.ex
Getting weird error while bulk inserts from CSV file into a DB table.
A command to execute a task is
mix data_monitor.load_mnemonics
defmodule Mix.Tasks.DataMonitor.LoadMnemonics do
…

Jagdish
- 752
- 8
- 23
4
votes
2 answers
Debugging Elixir phoenix.server
What I am looking for is some ideas on how to debug mix phoenix.server
When I run the command there is no output and it hangs (doesn't finish and show the cmd prompt). I've tried:
IEx -S mix phoenix.server
this opens up the elixir session but at…

jaydel
- 14,389
- 14
- 62
- 98
4
votes
2 answers
Elixir dependency on local project or private repo
I'm new in both Elixir and Phoenix. Currently I have some concern regarding downloading or using library from private or local mix project.
Let say my lib project name is: my_custom_mix_app and its an OTP app using gen_server. And I want it to be…

Bromo Programmer
- 670
- 2
- 13
- 37
4
votes
1 answer
missing Phoenix specific mix tasks / generators
I'm missing Phoenix specific mix tasks, e.g. mix phoenix.gen.html
$ mix help | grep -i phoenix
mix local.phoenix # Updates Phoenix locally
mix phoenix.new # Creates a new Phoenix v1.2.1 application
$ mix -v
Erlang/OTP 19 [erts-8.1]…

user7017138
- 41
- 3
4
votes
1 answer
Mix Test - Test patterns did not match any file
I wrote a few tests for my Elixir project and put them in the test/ directory. Now that I run mix test, I get:
$ mix test
Test patterns did not match any file:
That's it, there's nothing after that. Do I have to manually set the path for my tests?…

Sheharyar
- 73,588
- 21
- 168
- 215
4
votes
0 answers
DB OwnershipError when running tests using MySQL server
When running a set of tests by using mix test I get
** (DBConnection.OwnershipError) cannot find ownership process for #PID<0.414.0>.
When using ownership, you must manage connections in one
of the three ways:
* By explicitly…

David
- 595
- 1
- 8
- 19