smpallen99 / ex_admin

ExAdmin is an auto administration package for Elixir and the Phoenix Framework
MIT License
1.2k stars 275 forks source link

mix admin.install error #445

Open rickmutua opened 6 years ago

rickmutua commented 6 years ago
$ mix admin.install
* creating css files
* creating js files
* updating config/config.exs
* skipping xain config. It already exists.
** (ArgumentError) could not fetch application environment :default_locale for application :gettext because the application was not loaded/started. If your application depends on :gettext at runtime, make sure to load/start it or list it under :extra_applications in your mix.exs file
    (elixir) lib/application.ex:373: Application.fetch_env!/2
    lib/gettext.ex:677: Gettext.dgettext/4
    lib/mix/tasks/admin.install.ex:229: Mix.Tasks.Admin.Install.do_dashboard/1
    lib/mix/tasks/admin.install.ex:57: Mix.Tasks.Admin.Install.do_install/1
    (mix) lib/mix/task.ex:314: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:80: Mix.CLI.run_task/2
trptcolin commented 5 years ago

Workaround for us was adding a default_locale to our application's gettext config, e.g.

config :gettext,
  default_locale: "en/us"

That was in addition to following the suggestion in the error message, adding :gettext to the extra_applications list in mix.exs.