私は Elixir を学習し、単純な elixir の hello world の例を作成しようとしていますが、「mix run」を実行するとこのエラーが発生し続けます
(Mix) Could not start application collector:
Collector.start(:normal, []) returned an error:
shutdown: failed to start child: Collector.Sample
(EXIT) nil
私は何を間違っていますか?これが私のコードから mix.exs とその他の重要でないファイルを除いたものです
defmodule Collector do
use Application
def start(_type, _args) do
Collector.Supervisor.start_link
end
end
defmodule Collector.Supervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok)
end
def init(:ok) do
children = [
supervisor(Collector.Sample, [])
]
supervise(children, strategy: :one_for_one)
end
end
defmodule Collector.Sample do
use Application
def start_link do
end
def run do
IO.puts "Hello World"
end
end
コンソールで「mix run」を実行したときに「Hello World」をダンプしたいのですが、メソッドを呼び出す方法や場所がわかりませんrun()。ありがとうございました