Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Migration 使用Elixir中的exrm在服务器上运行迁移_Migration_Elixir_Phoenix Framework - Fatal编程技术网

Migration 使用Elixir中的exrm在服务器上运行迁移

Migration 使用Elixir中的exrm在服务器上运行迁移,migration,elixir,phoenix-framework,Migration,Elixir,Phoenix Framework,我需要在通过exrm部署Phoenix应用程序的服务器上运行迁移。根据这一点,我为迁移创建了第一个文件并运行了它: $ 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

我需要在通过exrm部署Phoenix应用程序的服务器上运行迁移。根据这一点,我为迁移创建了第一个文件并运行了它:

$ 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

priv
目录不在加载路径中。将
tasks.exs
移动到
lib/tasks.ex
,它应该可以工作。

priv
目录不在加载路径中。将
tasks.exs
移动到
lib/tasks.ex
,它应该可以工作。

请发布您的tasks.ex文件。它与文章中的文件相同。在文章中,它们使用
migrate
函数,您正在使用
test2
。如果完全相同,请使用
rel/my\u-app/bin/my\u-app命令发布任务迁移
。请发布您的tasks.ex文件。它与文章中的相同。在文章中,它们使用
migrate
函数,您使用的是
test2
。如果完全相同,请使用
rel/my\u app/bin/my\u app命令release\u tasks migrate