安装phoenix框架时出错

安装phoenix框架时出错

本文介绍了安装phoenix框架时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首次尝试使用phoenix和Elixir.在运行项目时被卡在最后.

Trying out phoenix and Elixir for the first time. Stuck at the very end while running the project.

mix phoenix.server

有人遇到过同样的问题吗?这是错误跟踪. (postgrex被添加为依赖项)

Anyone had the same problem? Here is error trace. (postgrex was added as a dependency)

**(混合)无法启动应用程序博客:Blog.start(:n​​ormal,[])返回错误:关机:无法启动子项:Blog.Repo **(退出)关闭:无法启动子级:Ecto.Adapters.Postgres **(退出)引发了异常: **(RuntimeError)找不到Ecto.Adapters.Postgres.Connection.

** (Mix) Could not start application blog: Blog.start(:normal, []) returned an error: shutdown: failed to start child: Blog.Repo ** (EXIT) shutdown: failed to start child: Ecto.Adapters.Postgres ** (EXIT) an exception was raised: ** (RuntimeError) could not find Ecto.Adapters.Postgres.Connection.

请确认您已添加:postgrex作为依赖项:

Please verify you have added :postgrex as a dependency:

{:postgrex, ">= 0.0.0"}

请记住,之后请通过清理当前版本来重新编译Ecto:

And remember to recompile Ecto afterwards by cleaning the current build:

mix deps.clean ecto

            (ecto) lib/ecto/adapters/sql.ex:420: Ecto.Adapters.SQL.start_link/4
            (stdlib) supervisor.erl:343: :supervisor.do_start_child/2
            (stdlib) supervisor.erl:326: :supervisor.start_children/3
            (stdlib) supervisor.erl:292: :supervisor.init_children/2
            (stdlib) gen_server.erl:328: :gen_server.init_it/6
            (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

推荐答案

此问题已在最新的ecto中修复.请运行:

This has been fixed in the latest ecto. Please run:

$ mix deps.update ecto
$ mix phoenix.server

您应该已经准备就绪

这篇关于安装phoenix框架时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 02:49