Closed datafoo closed 4 years ago
Documentation indicates:
Initialize a database using a Elixir releases […] defmodule MyApp.ReleaseTasks do def init_event_store do […] :ok = Application.load(:eventstore) […] end end
[…]
defmodule MyApp.ReleaseTasks do def init_event_store do […] :ok = Application.load(:eventstore) […] end end
Since I migrated to EventStore 1.0.0, Application.load(:eventstore) does not help. I get this error:
Application.load(:eventstore)
$ _build/prod/rel/my_app/bin/my_app eval "MyApp.ReleaseTasks.init_event_store()" ** (ArgumentError) MyApp.EventStore storage configuration not specified in environment (eventstore) lib/event_store/config.ex:13: EventStore.Config.get/2 (eventstore) lib/event_store/config.ex:31: EventStore.Config.parsed/2 lib/my_app/release_tasks.ex:12: MyApp.ReleaseTasks.init_event_store/0 (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6 (elixir) lib/code.ex:240: Code.eval_string/3
However, if I use Application.load(:my_app) it works:
Application.load(:my_app)
$ _build/prod/rel/my_app/bin/my_app eval "MyApp.ReleaseTasks.init_event_store()" The EventStore database has been initialized.
Is the current documentation accurate?
The documentation needs to be updated for v1. Pull request gladly accepted!
Documentation indicates:
Since I migrated to EventStore 1.0.0,
Application.load(:eventstore)
does not help. I get this error:However, if I use
Application.load(:my_app)
it works:Is the current documentation accurate?