Just finished the Ecto tutorial and building the friends example app. Everything works as expected in a iex CRUD session.
Now, I want to make that friends app I just built a dependency in a simple Elixir app. I don’t want to wrestle just yet with an umbrella app or a phoenix app, but just a straightforward Elixir app with the friends app as a dependency.
So I created a: $ mix new test_app --sup, added the friends app as a dependency by referencing its repo location, and ran $ mix deps.get.
Next from the test_app directory I stepped into the deps/friends directory and ran the usual sequence of mix ecto commands (drop, create, migrate) to prep the dependency.
However, after all that when I then run from the parent test_app directory $ mix compile I get the following error:
== Compilation error in file lib/friends/repo.ex ==
** (ArgumentError) missing :adapter configuration in config :friends, Friends.Repo
lib/ecto/repo/supervisor.ex:69: Ecto.Repo.Supervisor.compile_config/2
lib/friends/repo.ex:2: (module)
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
could not compile dependency :friends, “mix compile” failed. You can recompile this dependency with “mix deps.compile friends”, update it with “mix deps.update friends” or clean it with “mix deps.clean friends”
Is there something Ecto related I must do in the parent test_app so its mix can figure how to work with the friends dependency?
Thanks