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

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New

Other Trending Topics Top

Potions
A new screencast on live LiveView updates with PubSub, the Oban Web dashboard, and smarter retries. Part 2 of 2. Screencast + full walkth...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
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
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews