我升级到Elixir 1.3。当我尝试使用mix phoenix.server
启动我的Phoenix应用时出现错误:
== Compilation error on file web/views/page_view.ex ==
** (UndefinedFunctionError) function Phoenix.HTML.Engine.init/1 is undefined or private
尝试通过升级lib来修复它,我遇到了其他错误:
** (CompileError) lib/poison/parser.ex:11: Poison.SyntaxError.__struct__/1 is undefined, cannot expand struct Poison.SyntaxError
和
== Compilation error on file lib/plug/test.ex ==
** (CompileError) lib/plug/test.ex:53: Plug.Conn.__struct__/1 is undefined, cannot expand struct Plug.Conn
(stdlib) lists.erl:1353: :lists.mapfoldl/3
有什么想法吗?
答案 0 :(得分:4)
似乎为我修复的是迫使依赖项重新编译:
mix deps.compile --force
如果在尝试运行测试时遇到错误,请尝试:
MIX_ENV=test mix deps.compile --force