I got error:
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
Compiling 4 files (.ex)
Generated friends app
10:20:39.246 [error] Supervisor 'Elixir.Logger.Supervisor' had child 'Elixir.Logger.ErrorHandler' started with 'Elixir.Logger.Watcher':start_link({error_logger,'Elixir.Logger.ErrorHandler',{true,false,500}}) at <0.228.0> exit with reason normal in context child_terminated
10:20:39.299 [info] Application lager started on node nonode@nohost
10:20:39.304 [info] Application xmerl started on node nonode@nohost
10:20:39.307 [info] Application jsx started on node nonode@nohost
10:20:39.317 [info] Application ranch started on node nonode@nohost
10:20:39.320 [info] Application ranch_proxy_protocol started on node nonode@nohost
10:20:39.322 [info] Application recon started on node nonode@nohost
10:20:39.322 [info] Application rabbit_common started on node nonode@nohost
10:20:39.329 [info] Application amqp_client started on node nonode@nohost
10:20:39.330 [info] Application amqp started on node nonode@nohost
10:20:39.343 [info] Application decimal started on node nonode@nohost
10:20:39.345 [info] Application poolboy started on node nonode@nohost
10:20:39.350 [info] Application ecto started on node nonode@nohost
10:20:39.355 [info] Application connection started on node nonode@nohost
10:20:39.379 [info] Application db_connection started on node nonode@nohost
10:20:39.414 [info] Application mongodb started on node nonode@nohost
10:20:39.414 [info] Application mongodb_ecto started on node nonode@nohost
10:20:39.442 [error] CRASH REPORT Process <0.303.0> with 0 neighbours exited with reason: #{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',message => <<"The module Friends.Repo was given as a child to a supervisor\nbut it does not implement child_spec/1.\n\nIf you own the given module, please define a child_spec/1 function\nthat receives an argument and returns a child specification as a map.\nFor example:\n\n def child_spec(opts) do\n %{\n id: __MODULE__,\n start: {__MODULE__, :start_link, [opts]},\n type: :worker,\n restart: :permanent,\n ...">>} in 'Elixir.Supervisor':init_child/1 line 635 in application_master:init/4 line 134
10:20:39.471 [info] Application friends exited: exited in: Friends.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) The module Friends.Repo was given as a child to a supervisor
but it does not implement child_spec/1.
If you own the given module, please define a child_spec/1 function
that receives an argument and returns a child specification as a map.
For example:
def child_spec(opts) do
%{
id: __MODULE__,
start: {__MODULE__, :start_link, [opts]},
type: :worker,
restart: :permanent,
shutdown: 500
}
end
Note that "use Agent", "use GenServer" and so on automatically define
this function for you.
However, if you don't own the given module and it doesn't implement
child_spec/1, instead of passing the module name directly as a supervisor
child, you will have to pass a child specification as a map:
%{
id: Friends.Repo,
start: {Friends.Repo, :start_link, [arg1, arg2]}
}
See the Supervisor documentation for more information.
(elixir) lib/supervisor.ex:635: Supervisor.init_child/1
(elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
(elixir) lib/supervisor.ex:621: Supervisor.init/2
(elixir) lib/supervisor.ex:573: Supervisor.start_link/2
(kernel) application_master.erl:273: :application_master.start_it_old/4
10:20:39.471 [info] Application friends exited with reason: #{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',message => <<"The module Friends.Repo was given as a child to a supervisor\nbut it does not implement child_spec/1.\n\nIf you own the given module, please define a child_spec/1 function\nthat receives an argument and returns a child specification as a map.\nFor example:\n\n def child_spec(opts) do\n %{\n id: __MODULE__,\n start: {__MODULE__, :start_link, [opts]},\n type: :worker,\n restart: :permanent,\n ...">>} in 'Elixir.Supervisor':init_child/1 line 635
** (Mix) Could not start application friends: exited in: Friends.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (ArgumentError) The module Friends.Repo was given as a child to a supervisor
but it does not implement child_spec/1.
If you own the given module, please define a child_spec/1 function
that receives an argument and returns a child specification as a map.
For example:
def child_spec(opts) do
%{
id: __MODULE__,
start: {__MODULE__, :start_link, [opts]},
type: :worker,
restart: :permanent,
shutdown: 500
}
end
Note that "use Agent", "use GenServer" and so on automatically define
this function for you.
However, if you don't own the given module and it doesn't implement
child_spec/1, instead of passing the module name directly as a supervisor
child, you will have to pass a child specification as a map:
%{
id: Friends.Repo,
start: {Friends.Repo, :start_link, [arg1, arg2]}
}
See the Supervisor documentation for more information.
(elixir) lib/supervisor.ex:635: Supervisor.init_child/1
(elixir) lib/enum.ex:1294: Enum."-map/2-lists^map/1-0-"/2
(elixir) lib/supervisor.ex:621: Supervisor.init/2
(elixir) lib/supervisor.ex:573: Supervisor.start_link/2
(kernel) application_master.erl:273: :application_master.start_it_old/4