-1

In config/dev.exs:

config :drupex, Drupex.Repo,
  adapter: Ecto.Adapters.Postgres,
  -- username, password, database, hostname, pool_size omitted --

config :drupex, Drupex.DrupalRepo,
  adapter: Ecto.Adapters.Mysql,
  -- username, password, database, hostname omitted --

In mix.exs under defp deps do I added {:mariaex, "~> 0.8.2"}, just after {:postgrex, ">= 0.0.0"}. Finally in lib/drupex/repo.ex I added

defmodule Drupex.DrupalRepo do
  use Ecto.Repo, otp_app: :drupex
end

I ran mix deps.get , mix deps.compile now running mix I get

** (ArgumentError) adapter Ecto.Adapters.Mysql was not compiled, ensure it is correct and it is included as a project dependency
chx
  • 11,270
  • 7
  • 55
  • 129
  • The close argument is invalid, it's not a typo but whether Elixir is case sensitive or insensitive, made harder by the adapter name Postgres. – chx Apr 13 '18 at 23:40
  • Just for future reference, any "bare word" starting with an upper case letter or a colon are atoms (`Ecto.Adapters.MySql` and `:ok` are both atoms). Atoms in Elixir and Erlang are case sensitive. [The getting started guide](https://elixir-lang.org/getting-started/basic-types.html#atoms) gives a decent overview of what atoms are. – Justin Wood Apr 14 '18 at 01:11

1 Answers1

0

Turns out the adapter is called MySQL and it is case sensitive. Changing to adapter: Ecto.Adapters.MySQL, solved the problem.

chx
  • 11,270
  • 7
  • 55
  • 129