【发布时间】:2019-04-02 09:32:45
【问题描述】:
我无法创建我的 Phoenix 项目。希望得到一些关于如何解决它的建议。
设置详情:
- Ubuntu 16.04.4 LTS
- Erlang/OTP 21 [erts-10.1] [来源] [64 位] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
- Elixir 1.7.3(已编译 使用 Erlang/OTP 20)
- Mix 1.7.3(使用 Erlang/OTP 20 编译)
- Ecto v3.0.0
我正在关注Phoenix Up and Running 制作一个应用程序。
mix phx.new hello
cd hello
mix ecto.create
最后一个命令给了我:
== Compilation error in file lib/hello/repo.ex ==
** (ArgumentError) adapter Ecto.Adapters.Postgres was not compiled, ensure it is correct and it is included as a project dependency
lib/ecto/repo/supervisor.ex:71: Ecto.Repo.Supervisor.compile_config/2
lib/hello/repo.ex:2: (module)
(stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:206: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
我已经安装了 postgres。我有 postgres 超级用户。
【问题讨论】:
-
在您的项目
mix.exs文件中。你的依赖项中有{:postgrex, ">= 0.0.0"}之类的东西吗? -
是的,我在阅读一些博客后改为 {:postgrex, ">= 0.10.0"},但没有运气:(
-
您是否将
ecto_sql包含为依赖项?
标签: postgresql elixir phoenix-framework ecto