【发布时间】:2017-01-26 21:53:50
【问题描述】:
我尝试使用quantum 作为 Phoenix 应用程序的 cronjob 工具。它在我的开发系统上没有问题。但我无法让它在生产中运行。 ./node_modules/brunch/bin/brunch b -p && MIX_ENV=prod mix do phoenix.digest, release --env=prod --upgrade 总是以这个错误结束:
Generated abc app
==> Assembling release..
==> Building release abc:1.2.53 using environment prod
==> Including ERTS 8.2 from /usr/lib/erlang/erts-8.2
==> Failed to build release:
Undefined applications: [stdlib,kernel]
- 开发:macOS 10.12.2。 Erlang 19. Elixir 1.4.0
- 生产:Debian Linux。 Erlang 19. Elixir 1.4.0
我正在目标上构建生产并在开发机器上进行开发。当我删除mix.exs 中的量子部分时,它可以工作。
设置:
mix.exs
def application do
[mod: {Abc, []},
applications: [:phoenix,
:phoenix_pubsub,
:phoenix_html,
:cowboy,
:logger,
:gettext,
:phoenix_ecto,
:ex_machina,
:phoenix_html_simplified_helpers,
:bamboo,
:bamboo_smtp,
:mariaex,
:httpoison,
:slugger,
:timex_ecto,
:word_smith,
:arc,
:arc_ecto,
:quantum]]
end
defp deps do
[{:ecto, "~> 2.0.1", override: true},
{:bamboo, "~> 0.6"},
{:bamboo_smtp, "~> 1.1.0"},
{:phoenix, "~> 1.2.0"},
{:phoenix_ecto, "~> 3.0.0-rc"},
{:phoenix_html, "~> 2.8"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.12.1"},
[...]
{:distillery, "~> 0.10"},
{:quantum, ">= 1.8.1"}]
end
我该如何解决这个问题?
【问题讨论】:
-
你本地和远程有什么erlang版本?
-
19 开发和生产。
-
无法在 Arch 上构建版本,这与目标不同:“The build host must be similar to the production/staging hosts.”——您可能需要重新考虑部署策略。
-
我正在建立目标。所以这不可能。
-
你可以试试 distillery 1.1.0 吗?看起来类似的错误已在 1.1.0 中修复:github.com/bitwalker/distillery/commit/…。