2

私は単純なフェニックス アプリケーションを持っており、exrm. を使用して実行すると、アプリケーションは正常に動作します

mix phoenix.start

しかし、それを使用して構築した後

mix release

(エラーなしで終了します)、実行可能ファイルを実行するとエラーが返されます。

rel/my_app/bin/my_app foreground

Exec: /home/ubuntu/projects/my_app/rel/my_app/erts-6.0/bin/erlexec -noshell -noinput +Bd -boot /home/ubuntu/projects/my_app/rel/my_app/releases/0.0.1/my_app -mode embedded -config /home/ubuntu/projects/my_app/rel/my_app/releases/0.0.1/sys.config -args_file /home/ubuntu/projects/my_app/rel/my_app/releases/0.0.1/vm.args -user Elixir.IEx.CLI -extra --no-halt +iex -- foreground
Root: /home/ubuntu/projects/my_app/rel/my_app
Erlang/OTP 17 [erts-6.0] [source-07b8f44] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

{"Kernel pid terminated",application_controller,"{application_start_failure,my_app,{bad_return,{{'Elixir.MyApp',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.MyApp',start,[normal,[]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,272}]}]}}}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,my_app,{bad_return,{{'Elixir.MyApp',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.MyApp',start,[normal,[]],[]},{application

私のmix.exs見た目は次のようになります:

defmodule MyApp.Mixfile do
  use Mix.Project

  def project do
    [ app: :my_app,
      version: "0.0.1",
      elixir: "~> 0.13.2",
      deps: deps ]
  end

  # Configuration for the OTP application
  def application do
    [
      mod: { MyApp, [] },
      applications: [:phoenix]
    ]
  end

  # Returns the list of dependencies in the format:
  # { :foobar, git: "https://github.com/elixir-lang/foobar.git", tag: "0.1" }
  #
  # To specify particular versions, regardless of the tag, do:
  # { :barbat, "~> 0.1", github: "elixir-lang/barbat" }
  defp deps do
    [
      {:phoenix, "0.2.4"},
      {:jazz, github: "meh/jazz", ref: "7af3b74e58eb1a3fc6b9874a2077efa420f6dfcc"},
      {:cowboy, github: "extend/cowboy", override: true, ref: "05024529679d1d0203b8dcd6e2932cc2a526d370"},
      #{ :redis, "1.1.0", [ github: "timbuchwaldt/elixir-redis"] },
      {:erlcloud,github: "gleber/erlcloud"},
      { :json,  github: "cblage/elixir-json" },
      { :amnesia, github: "uriagassi/amnesia" },
      { :exrm, "~> 0.8.1"}
    ]
  end
end

含まmy_app.exれるものstart/2

defmodule MyApp do
  use Application.Behaviour

  # See http://elixir-lang.org/docs/stable/Application.Behaviour.html
  # for more information on OTP Applications
  def start(_type, _args) do
    MyApp.Supervisor.start_link
  end
end

何か案は?

4

2 に答える 2