我需要在已经通过exrm部署了Phoenix应用程序的服务器上运行迁移。根据这个http://blog.plataformatec.com.br/2016/04/running-migration-in-an-exrm-release/,我首先为迁移创建了第一个文件,并运行了它:
$ rel/my_app/bin/my_app test1 Elixir.Release.Tasks migrateUsing ....../rel/my_app/releases/0.0.2/my_app.sh
Usage: my_app {start|start_boot <file>|foreground|stop|restart|reboot|ping|rpc <m> <f> [<a>]|console|console_clean|console_boot <file>|attach|remote_console|upgrade|escript|command <m> <f> <args>}然后我决定尝试第二种方法,创建第二个文件并运行它:
$ rel/my_app/bin/my_app command release_tasks test2
Using ......./rel/my_app/releases/0.0.2/my_app.sh
{"init terminating in do_boot",{undef,[{release_tasks,test2,[],[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()这有什么问题吗?
我的文件在priv/tasks.exs
发布于 2016-05-14 17:29:34
priv目录不在加载路径中。将tasks.exs移动到lib/tasks.ex,它应该可以工作。
https://stackoverflow.com/questions/37222744
复制相似问题