操作
バグ #1569
完了ruby3.1.0環境で新規confでの起動に失敗する
プラグイン名:
uitranslator
クラッシュする:
はい
説明
ruby 3.1.0 環境で新規confで起動しようとすると、下記エラーで落ちます。
/home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:178:in `require': cannot load such file -- mathn (LoadError) from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:178:in `next_prime' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:217:in `save_to_stream' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:292:in `block in save_to_file' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:292:in `open' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/mo.rb:292:in `save_to_file' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/tools/msgfmt.rb:58:in `run' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/gettext-3.4.1/lib/gettext/tools/msgfmt.rb:38:in `run' from /home/ahiru/work/mikutter/mikutter/plugin/uitranslator/uitranslator.rb:37:in `block in spec=' from /home/ahiru/work/mikutter/mikutter/plugin/uitranslator/uitranslator.rb:34:in `each' from /home/ahiru/work/mikutter/mikutter/plugin/uitranslator/uitranslator.rb:34:in `spec=' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:156:in `block (2 levels) in load' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/pluggaloid-1.7.0/lib/pluggaloid/plugin.rb:39:in `instance_eval' from /home/ahiru/work/mikutter/mikutter/vendor/bundle/ruby/3.1.0/gems/pluggaloid-1.7.0/lib/pluggaloid/plugin.rb:39:in `create' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:155:in `block in load' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `block in atomic' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `synchronize' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `atomic' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:147:in `load' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:149:in `block (2 levels) in load' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:148:in `each' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:148:in `block in load' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `block in atomic' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `synchronize' from /home/ahiru/work/mikutter/mikutter/core/utils.rb:288:in `atomic' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:147:in `load' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:99:in `block in load_all' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:40:in `block in each_spec' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:35:in `each' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:35:in `each' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:38:in `each_spec' from /home/ahiru/work/mikutter/mikutter/core/miquire_plugin.rb:98:in `load_all' from /home/ahiru/work/mikutter/mikutter/core/boot/load_plugin.rb:14:in `<top (required)>' from mikutter.rb:55:in `require' from mikutter.rb:55:in `<main>'ruby3.1.0からgettextがrequireしているprime gemがdefault gemsからbundle gemsに移行されたことが原因のようです。
具体的にはprimeをrequireしようとした結果、LoadErrorとなりエラーハンドリングでmathnがrequireされているが、そんな依存はないのでmathnもLoadErrorとなり上記エラーを発生させています。
参考までにprime gemがdefault gemからbundle gemに移行した情報は下記のとおりです。
再現手順
ruby 3.1.0 使用して、新規confで起動する。
操作