So I make a release of my app using distillery, after a successful release I take the my_app.tar.gz and copy the file to my ubuntu server (16.04), then I extract the newly uploaded file and start my app like this to check that everything is ok:
I choose distillery because there was no need to install erlang and elixir, but what is going on here?? Is this a dependency issue? If there is how can I fixed?
This is my config.exs
Path.join(["rel", "plugins", "*.exs"]) |> Path.wildcard() |> Enum.map(&Code.eval_file(&1)) use Mix.Releases.Config, default_release: :default, default_environment: Mix.env() environment :dev do set dev_mode: true set include_erts: false end environment :prod do set include_erts: true set include_src: false end release :my_app do set version: current_version(:my_app) end
PS: node is installed on the server.
**** EDIT ****
I’m trying to build my release on ubuntu 14.04 (Virtual machine) and I’m getting this error:
Check your digested files at "priv/static" Building release with MIX_ENV=prod. ** (FunctionClauseError) no function clause matching in Mix.env/1 (mix) lib/mix.ex:213: Mix.env("prod") lib/exrm/utils/utils.ex:19: ReleaseManager.Utils.with_env/2 lib/mix/tasks/release.ex:164: Mix.Tasks.Release.generate_sys_config/1 lib/mix/tasks/release.ex:74: Mix.Tasks.Release.do_run/1 (mix) lib/mix/task.ex:294: Mix.Task.run_task/3 (elixir) lib/enum.ex:645: Enum."-each/2-lists^foreach/1-0-"/2 (elixir) lib/enum.ex:645: Enum.each/2 (mix) lib/mix/task.ex:294: Mix.Task.run_task/3