Nebo15 / ecto_trail

EctoTrail allows to store Ecto changeset changes in a separate audit_log table.
https://hex.pm/packages/ecto_trail
MIT License
54 stars 5 forks source link

could not compile dependency :ecto_trail, #10

Closed mannhegde closed 6 years ago

mannhegde commented 6 years ago
==> ecto_trail
Compiling 2 files (.ex)

== Compilation error in file lib/ecto_trail/changelog.ex ==
** (ArgumentError) could not fetch application environment :table_name for application :ecto_trail because the application was not loaded/started. If your application depends on :ecto_trail at runtime, make sure to load/start it or list it under :extra_applications in your mix.exs file
    (elixir) lib/application.ex:354: Application.fetch_env!/2
    lib/ecto_trail/changelog.ex:8: (module)
    (stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
could not compile dependency :ecto_trail, "mix compile" failed. You can recompile this dependency with "mix deps.compile ecto_trail", update it with "mix deps.update ecto_trail" or clean it with "mix deps.clean ecto_trail"

kindly help fixing this.

AndrewDryga commented 6 years ago

@mannhegde you need to configure table name which is used to store the log:

config :ecto_trail, table_name: "audit_log"

I'll update the readme.

mannhegde commented 6 years ago

@AndrewDryga appreciate your quick response. it worked. thank you.