I’ve been working through Programming Elixir, the second half of Chapter 20 pertains to releases and hotcode reloading.
One of the first errors I experienced was when using mix release --env=prod
Mix could not invoke task “release” : 1 error found
–env :unknown option
When I found that the new mix format to be used for distillery was distillery., I started again (after cleaning) using distillery.init, then distillery.release --env=prod.
Everything was beginning to build then I got a Release Failed
error regarding not finding a file at ./config/config.exs, which is a bit odd because it’s my first time using distillery so I’m taking the out of the box approach, and copying files directly into config is not recommended by the distillery guides.
Throwing more at the problem I updated my dep description of distillery to include github: "bitwalker/distillery"
, in case github was ahead of the pm.
deps do
[
{:distillery, "~> 2.1", runtime: false, github: "bitwalker/distillery"}
]
end
runtime: false was removed, but I understand it is ignored anyway.
After I relented and touched config/config.exs I got to the packaging stage of distillery.release before triggering a Failed to archive release
error that no such file or directory was located at the target uri (stipulated in the error log).
Does distillery work on the latest OTP?
I’ve been looking around and haven’t found much info regarding these bugs other than that there was a breaking change in erlang/otp 25. I’m using Erlang/OTP 26. I’ve not seen notice of a rectification.
I downloaded OTP 24 but I am reluctant to switch to it for the sake of completing this example.
Moved to chapter 21 for the time being so this isn’t necessarily urgent, just a request for clarification.
Much appreciated.