0
저는 Phoenix를 사용하여 블로그를 작성하고 exrm로 배포하려고했습니다. 모든 것이 개발 과정에서 오류없이 작동하지만 콘솔에서 열려고하면 exrm 릴리스에서 오류가 발생합니다. 나는 이것을 따라왔다. tutorial. "priv/post"를 읽을 수 없습니다 : 해당 파일이나 디렉토리가 없습니다.
[info] Application blog exited: Blog.start(:normal, []) returned an error: shutdown: failed to start child: Blog.Repo
** (EXIT) an exception was raised:
** (File.Error) could not list directory "priv/posts": no such file or directory
(elixir) lib/file.ex:1174: File.ls!/1
(blog) lib/blog/crawler.ex:3: Blog.Crawler.crawl/0
(elixir) lib/agent/server.ex:8: Agent.Server.init/1
(stdlib) gen_server.erl:328: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
그냥 "PRIV/게시물"내 프로젝트 디렉토리를 존재 명확하게하기 :
이
내가 IEX에서 얻을 오류 메시지입니다. 그리고mix phoenix.server
이 그것을 인식합니다. exrm 릴리스에서만 오류를 보여줍니다.
오류가 발생하여 어린이 블로그를 시작하지 못했습니다. 신고합니다. 관리자에게 신고 했습니까? – TheAnh
함수에서 디렉토리가 지정된 방법에 문제가 있음을 알 수 있습니다. 단지''priv/posts'' 대신''Application.app_dir ("priv/posts")이어야합니다. –