cengkarim
Hi folks,
An Elixir beginner here. I’m reading the Programming Elixir 1.6 book and I’m in chapter 20, at using Distillery to release the app. Things are a bit outdated but I managed to find my way until this point where calling: mix distillery.release --env=prod is failing with this error messasge:
==> Invalid application `:sasl`! The file sasl.app does not exist or cannot be loaded.
I’m using elixir: "~> 1.15" and {:distillery, "~>2.0"} in my mix.exs.
I tried {:distillery, "~>2.1"} with no success. Looked up online and couldn’t find much information to help root cause the issue. Any clue what I’m missing here? Thanks!
❯ mix distillery.init
An example config file has been placed in rel/config.exs, review it,
make edits as needed/desired, and then run `mix distillery.release` to build the release
❯ mix distillery.release --env=prod
==> Assembling release..
==> Building release sequence_supervisor:0.1.0 using environment prod
==> Invalid application `:sasl`! The file sasl.app does not exist or cannot be loaded.
❯ iex --version
IEx 1.15.7 (compiled with Erlang/OTP 26)
❯ elixir --version
Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
Elixir 1.15.7 (compiled with Erlang/OTP 26)
❯ mix --version
Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
Mix 1.15.7 (compiled with Erlang/OTP 26)
Trending in Questions
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
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
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
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
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
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
D4no0
Distilleryis no longer used for elixir releases, as elixir has its own release tool these days: mix release — Mix v1.20.2I would recommend to just take a look at documentation and try to adapt your project to elixir releases.
If that doesn’t work, I might guess the culprit most probably is the OTP version, in that book should be specified what OTP and elixir versions were used, stick to them and everything should work in theory.
cengkarim
Yup,
mix releaseworked for me.psylone
mix releaseis a really wonderful tool, but it doesn’t support hot code upgrades while Distillery does.So if you want to use Distillery here are the steps that you need:
Use Erlang/OTP 24 because Distillery is not compatible with OTP 25
Use Elixir version
1.14or earlier. If you use a later version, you will not be able to run the IEx console in Distillery release. I suppose the reason is here and after Elixir1.14moduleIEx.CLIwas refactoredHere is my
tool-versionsfile from the brilliant asdf version manager:config/config.exsfile with this content:projectfunction from themix.exsfile, for example:Yes, I also read this wonderful book and encountered the same problem
distilleryprefix, for example:mix distillery.initandmix distillery.release --env=prod(my Distillery version is2.1.1)With all this, I was able to successfully complete the entire chapter of the book.
LostKobrakai
While there‘s no built in support it can be added by third parties: Castle - Hot-Code Upgrade Support for Elixir
cengkarim
I had to skip that chapter unfortunately. The release process is still not clear to me. I’ll try your suggestion though!
Wondering how common it is to downgrade Elixir/Erlang in prod applications?
psylone
Sometimes, this occurs just like it does with any other application in a different stack. However, it is usually common practice to use Docker and simply redeploy the container with the previous version.I apologize; at first, I misunderstood the question.
It depends. we usually strive to use the latest versions of Elixir/Erlang. However, if it’s a critical system, there might be a compromise: using hot code updates but sticking to slightly older versions of Elixir/Erlang.
One way or another, I haven’t encountered the use of hot code updates in production. Typically, Docker containers are used along with the latest versions of Elixir/Erlang. Nevertheless, it was useful to get acquainted with this mechanism and experiment with it in the context of this chapter of the book.