1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mix release で ram_file.compress/1 is undefined or private とエラーが出たときの対処

Last updated at Posted at 2021-07-21

はじめに

先ほど起こったエラーです

解決方法は elixir forum にありました

実行環境

Elixir 1.9.2 (compiled with Erlang/OTP 23)

エラー内容

表題の通り、サーバーで mix release を実行すると、 以下のようなエラーが返ってきました

18:54:03.260 [error] Task #PID<0.5821.0> started from #PID<0.93.0> terminating
** (UndefinedFunctionError) function :ram_file.compress/1 is undefined or private
    (kernel) :ram_file.compress({:file_descriptor, :ram_file, #Port<0.6>})
    (mix) lib/mix/release.ex:722: Mix.Release.strip_beam/1
    (mix) lib/mix/release.ex:693: anonymous fn/5 in Mix.Release.copy_ebin/3
    (elixir) lib/enum.ex:1948: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix) lib/mix/release.ex:688: Mix.Release.copy_ebin/3
    (mix) lib/mix/tasks/release.ex:1163: Mix.Tasks.Release.copy/2
    (elixir) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
    (elixir) lib/task/supervised.ex:35: Task.Supervised.reply/5
    (stdlib) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

対処

Elixir のバージョンを最新にすることでエラーを回避できました

更新後のバージョン

$ elixir --version
Erlang/OTP 24 [erts-12.0.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1]

Elixir 1.12.2 (compiled with Erlang/OTP 24)

まとめ

ビルド用環境はこまめに更新しましょう

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?