"an adapter was given to :pubsub but no :name was defined" 与 Elixir/Phoenix 在 v0.9.0 之后
"an adapter was given to :pubsub but no :name was defined" with Elixir/Phoenix after v0.9.0
从v0.9.0开始切换到Phoenix master后运行 mix compile
出现这个错误:
== Compilation error on file lib/youli/endpoint.ex ==
** (ArgumentError) an adapter was given to :pubsub but no :name was defined, please pass the :name option accordingly
lib/youli/endpoint.ex:2: (module)
(stdlib) erl_eval.erl:657: :erl_eval.do_apply/6
我没有更改此文件中的任何内容,它的模板看起来也没有更改。
diff lib/youli/endpoint.Ex \
<(cat deps/phoenix/priv/template/lib/application_name/endpoint.ex \
| sed 's/<%= application_name %>/youli/g' \
| sed 's/<%= application_module %>/Youli/g')
=> nothing important
关于如何解决这个问题的任何提示?
您现在需要在选项中加入 :name
。 pubsub: [name: MyApp.PubSub, adapter: Phoenix.PubSub.PG2]
从v0.9.0开始切换到Phoenix master后运行 mix compile
出现这个错误:
== Compilation error on file lib/youli/endpoint.ex ==
** (ArgumentError) an adapter was given to :pubsub but no :name was defined, please pass the :name option accordingly
lib/youli/endpoint.ex:2: (module)
(stdlib) erl_eval.erl:657: :erl_eval.do_apply/6
我没有更改此文件中的任何内容,它的模板看起来也没有更改。
diff lib/youli/endpoint.Ex \
<(cat deps/phoenix/priv/template/lib/application_name/endpoint.ex \
| sed 's/<%= application_name %>/youli/g' \
| sed 's/<%= application_module %>/Youli/g')
=> nothing important
关于如何解决这个问题的任何提示?
您现在需要在选项中加入 :name
。 pubsub: [name: MyApp.PubSub, adapter: Phoenix.PubSub.PG2]