在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 --
在mix.exs
下的defp deps do
下,我在{:mariaex, "~> 0.8.2"},
之后添加了{:postgrex, ">= 0.0.0"}
。最后在lib/drupex/repo.ex
我添加了
defmodule Drupex.DrupalRepo do
use Ecto.Repo, otp_app: :drupex
end
我跑了mix deps.get
,mix deps.compile
现在正在运行mix
我得
** (ArgumentError) adapter Ecto.Adapters.Mysql was not compiled, ensure it is correct and it is included as a project dependency
答案 0 :(得分:0)
证明适配器名为MySQL
,并且区分大小写。更改为adapter: Ecto.Adapters.MySQL,
解决了问题。