ASCrookes

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!

Showing Posts 1 to 1

ASCrookes

ASCrookes OP

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 ebin directory and therefore was missing tzdata.app which was making the command fail. After resolving the dependency conflict it now works using the original release command posted by Platformatec

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
Stef-Verniers
Hello I’ve been coding in Elixir for almost two years now because of my current job where we implemented Elixir in our application. But ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews