iex -S mix
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
** (Mix) Could not start application ranch: could not find application file: ranch.app
defmodule Elixirrest.MixProject do
use Mix.Project
def project do
[
app: :elixirrest,
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[ {:maru, "~> 0.11"} ]
end
end
You should add cowboy too, and maybe jason, if You want… (It is an optional dependency of maru)
[
{:cowboy, "~> 2.1"},
{:maru, "~> 0.13.1"},
]
Then
$ mix deps.get
$ iex -S mix
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]
===> Compiling ranch
===> Compiling cowlib
===> Compiling cowboy
==> plug
Compiling 48 files (.ex)
Generated plug app
==> maru
Compiling 56 files (.ex)
warning: function Jason.decode!/1 is undefined (module Jason is not available)
lib/maru/test.ex:99
Generated maru app
==> elixirrest
Compiling 1 file (.ex)
Generated elixirrest app
Interactive Elixir (1.6.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
BTW the latest maru is 0.13.1, and optional jason is version 1.0
1 Like