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

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews