**(混合)无法启动应用程序rumbl:Rumbl.start(:n​​ormal,[])

时间:2016-05-09 07:11:12

标签: phoenix-framework

如果终端中出现下一个错误:

 (Mix) Could not start application rumbl: Rumbl.start(:normal, []) returned an error: shutdown: failed to start child: Rumbl.Repo
     (EXIT) an exception was raised:
         (UndefinedFunctionError) undefined function Rumbl.Repo.start_link/0
            (rumbl) Rumbl.Repo.start_link()
            (stdlib) supervisor.erl:358: :supervisor.do_start_child/2
            (stdlib) supervisor.erl:341: :supervisor.start_children/3
            (stdlib) supervisor.erl:307: :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 

2 个答案:

答案 0 :(得分:4)

只需在你的repo.ex文件中的最后一个末尾添加:



 def start_link do
    {:ok, self}
 end




答案 1 :(得分:3)

lib/rumbl.ex中,注释掉启动存储库的行:

# Start the Ecto repository
# supervisor(Rumbl.Repo, []),