0

I've always used edeliver to deploy my apps, but on my new app, I'm getting a weird error.

When I run mix edeliver migrate production, I'm getting this response:

EDELIVER MYPROJECT WITH MIGRATE COMMAND

-----> migrateing production servers

production node:

  user    : user
  host    : example.com
  path    : /home/user/app_release
  response: RPC to 'myproject@127.0.0.1' failed: {'EXIT',
                                      {#{'__exception__' => true,
                                         '__struct__' =>
                                          'Elixir.ArgumentError',
                                         message => <<"argument error">>},
                                       [{ets,lookup_element,
                                         ['Elixir.Ecto.Registry',nil,3],
                                         []},
                                        {'Elixir.Ecto.Registry',lookup,1,
                                         [{file,"lib/ecto/registry.ex"},
                                          {line,18}]},
                                        {'Elixir.Ecto.Adapters.SQL',sql_call,
                                         6,
                                         [{file,"lib/ecto/adapters/sql.ex"},
                                          {line,251}]},
                                        {'Elixir.Ecto.Adapters.SQL','query!',
                                         5,
                                         [{file,"lib/ecto/adapters/sql.ex"},
                                          {line,198}]},
                                        {'Elixir.Ecto.Adapters.MySQL',
                                         '-execute_ddl/3-fun-0-',4,
                                         [{file,"lib/ecto/adapters/mysql.ex"},
                                          {line,107}]},
                                        {'Elixir.Enum',
                                         '-reduce/3-lists^foldl/2-0-',3,
                                         [{file,"lib/enum.ex"},{line,1826}]},
                                        {'Elixir.Ecto.Adapters.MySQL',
                                         execute_ddl,3,
                                         [{file,"lib/ecto/adapters/mysql.ex"},
                                          {line,107}]},
                                        {'Elixir.Ecto.Migrator',
                                         '-migrated_versions/2-fun-0-',2,
                                         [{file,"lib/ecto/migrator.ex"},
                                          {line,44}]}]}}

But when I type mix edeliver restart production followed by the migration command, everything goes normally. Why is this happening?

  • Do you have `ECTO_REPOSITORY="MyApp.Repo"` declared in your `.deliver/config`? – Aleksei Matiushkin Dec 15 '17 at 06:02
  • @mudasobwa No, and how do you know that line has to be added? I don't find any reference to it in the official page: https://github.com/edeliver/edeliver. I'll try this out soon and see if it works. – Mohideen Imran Khan Dec 15 '17 at 07:00
  • I don’t remember, but I believe smth like this: https://duckduckgo.com/?q=edeliver+ecto+migrate&t=canonical&ia=software (third link is all yours.) I would even repost it here: http://blog.kate-travers.com/ecto-migrations-on-production/ – Aleksei Matiushkin Dec 15 '17 at 07:02

0 Answers0