ASCrookes
I was following the blog post by platformatec to be able to run migrations from my release. When I run the command
rel/my_app/bin/my_app command Elixir.MyApp.Release.Tasks migrate
I get the following error:
{"init terminating in do_boot",{function_clause,[{'Elixir.MyApp.Release.Tasks',check_started_response,[{error,{tzdata,{"no such file or directory","tzdata.app"}}}],[{file,"web/scripts/release_tasks.ex"},{line,17}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1088}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,"lib/enum.ex"},{line,1088}]},{'Elixir.MyApp.Release.Tasks',migrate,0,[{file,"web/scripts/release_tasks.ex"},{line,9}]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
The script is as follows:
defmodule MyApp.Release.Tasks do
@app :my_app
def migrate do
Application.load(@app) |> check_started_response()
results = Enum.map(Application.spec(@app, :applications), &Application.load(&1))
Enum.map(results, &check_started_response/1)
results = Enum.map(Application.spec(@app, :applications), &Application.ensure_all_started(&1))
Enum.map(results, &check_started_response/1)
path = Application.app_dir(:cymbal, "priv/master_repo/migrations")
Ecto.Migrator.run(MyApp.MasterRepo, path, :up, all: true)
:init.stop()
end
defp check_started_response(:ok), do: :ok
defp check_started_response({:ok, _}), do: :ok
defp check_started_response({:error, {:already_loaded, _}}), do: :ok
end
Using the exact (with changes for my specific app) code from the platformatec blog basically gave me the same error but the above code is from another forum post I ran into.
Any help would be incredible!
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #elixirconf-us
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ASCrookes
Had two versions of tzdata where in my mix.exs file I forced it into using the higher version. That ended up with there being two tzdata version in
rel/my_app/lib.One of those didn’t have an
ebindirectory and therefore was missingtzdata.appwhich was making the command fail. After resolving the dependency conflict it now works using the original release command posted by Platformatec