alg

alg

Hi gents,

I’m trying to upgrade our app from Elixir 1.3.3 to 1.6.5 and hit an issue with building for production. Mainly with compiling gettext:

 → MIX_ENV=prod mix deps.compile gettext
==> gettext
Compiling 20 files (.ex)
warning: redefining module Gettext.Backend (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.Backend.beam)
  lib/gettext/backend.ex:1

warning: redefining module Gettext.Compiler (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.Compiler.beam)
  lib/gettext/compiler.ex:1

warning: redefining module Gettext (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.beam)
  lib/gettext.ex:1

warning: redefining module Gettext.Extractor (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.Extractor.beam)
  lib/gettext/extractor.ex:1

warning: redefining module Gettext.Error (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.Error.beam)
  lib/gettext.ex:483

warning: redefining module Gettext.ExtractorAgent (current version loaded from /Users/alg/p/picsafe-key-server/_build/prod/lib/gettext/ebin/Elixir.Gettext.ExtractorAgent.beam)
  lib/gettext/extractor_agent.ex:1


== Compilation error in file lib/gettext/extractor.ex ==
** (CompileError) lib/gettext/extractor.ex:120: Gettext.PO.__struct__/1 is undefined, cannot expand struct Gettext.PO
    lib/gettext/extractor.ex:112: (module)
could not compile dependency :gettext, "mix compile" failed. You can recompile this dependency with "mix deps.compile gettext", update it with "mix deps.update gettext" or clean it with "mix deps.clean gettext"

Any ideas what might be wrong?

Showing Posts 1 to 5

NobbZ

NobbZ

When you upgrade the elixir or erlang version, always make sure you build from a clean state.

$ rm -rf _build deps
$ mix do deps.get, deps.compile

Then build your application as you are used to it.

alg

alg OP

Oh, I think this is what I missed:

I built and ran it in development and test environments just fine. But when I decided to test the production build, it started crashing on me with that error.

I will remember removing deps and build folder next time. Thanks!

Case closed.

josevalim

josevalim

Creator of Elixir

Btw, this was not supposed to be necessary. Maybe it was the large version bump (from v1.3 to v1.6) that triggered it. I will investigate.

alg

alg OP

Yeah, I would think so. Never noticed anything like it before. It wasn’t a version bump per se. I spent a day in dev/test making the app work on new version (1.6.6) and then just ran MIX_ENT=prod mix compile only to see it wouldn’t compile. So it’s something else. Just in case it’s helpful…

aabiro

aabiro

What triggered this for me was that I did not have my elixir_buildpack.config file in the root of my project

— 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
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
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
psy-q
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New

Other Trending Topics Top

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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
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
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews