Project

General

Profile

Actions

バグ #1576

closed

LoadErrorで起動しない

Added by Makoto Kishimoto over 3 years ago. Updated over 3 years ago.

Status:
終了
Priority:
通常
Target version:
プラグイン名:
クラッシュする:
Yes

Description

1月5日頃から、developブランチが、

<internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- delayer (LoadError)
        from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /home/ksmakoto/mikutter/core/boot/delayer.rb:3:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/local/lib/ruby/3.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from mikutter.rb:17:in `<main>'

のように、LoadErrorで起動しなくなった


再現手順

developブランチを起動しようとすると起きる


Related issues 1 (0 open1 closed)

Related to 提案 #1484: CLIコマンドのプラグインサポート終了toshi_a 初音Actions
Actions #1

Updated by Izumi Tsutsui over 3 years ago

  • Assignee set to Makoto Kishimoto

/usr/local/lib/ruby/ という文字列からしてたぶん FreeBSD + ports 環境ではないかと思うのですが

よって以下のいずれかが必要ではないかと思います
Actions #2

Updated by Makoto Kishimoto over 3 years ago

bundler で gem をローカルで入れて起動しています。

Actions #3

Updated by Makoto Kishimoto over 3 years ago

追いかけたところ、コミット dee446e04984103069092c00fbe19c5dc8c16196 が起点のようです

Actions #4

Updated by toshi_a 初音 over 3 years ago

  • Related to 提案 #1484: CLIコマンドのプラグインサポート added
Actions #6

Updated by toshi_a 初音 over 3 years ago

  • クラッシュする changed from No to Yes
Actions #7

Updated by toshi_a 初音 over 3 years ago

  • Target version changed from 5.0 to 5.1
Actions #8

Updated by Izumi Tsutsui over 3 years ago

delayer が system gem で入っている場合は問題なくて、 gem をすべて bunder を使って入れたときのみに発生するという気がしますが

from /home/ksmakoto/mikutter/core/boot/delayer.rb:3:in `<top (required)>'
の通り source:mikutter.rb@dee446e0
require 'boot/delayer'
の呼び出しが

if !ENV['DISABLE_BUNDLER_SETUP'] || ['', '0'].include?(ENV['DISABLE_BUNDLER_SETUP'].to_s)
  begin
    ENV['BUNDLE_GEMFILE'] = File.expand_path(File.join(File.dirname($0), "Gemfile"))
    require 'bundler/setup'
  rescue LoadError, SystemExit
    # bundlerがないか、依存関係の解決に失敗した場合
    # System の gem を使ってみる
  end
end

の bundler のブロックより後ろにないとダメ、という気はします。

Actions #9

Updated by Shibafu Midorino over 3 years ago

手元の環境で試してみましたが、ruby mikutter.rb や実行権限付けての mikutter.rb 直接起動で再現できました。
私もbundlerを使用してセットアップしているのですが、普段 bundle exec ruby mikutter.rb で起動しているので気づいていませんでした。

Actions #10

Updated by Shibafu Midorino over 3 years ago

  • Status changed from 分類待ち to 実装待ち
Actions #11

Updated by Shibafu Midorino over 3 years ago

  • Status changed from 実装待ち to レビュー待ち
  • ブランチ set to topic/1576-require-bundler-setup-first

ブランチ topic/1576-require-bundler-setup-first に修正をpushしました。起動できるか確認をお願いできますか?

Actions #12

Updated by Makoto Kishimoto over 3 years ago

起動できました。
(なお、bundle exec ruby mikutter.rb で個人的には解決です)

Actions #13

Updated by Izumi Tsutsui over 3 years ago

  • Status changed from レビュー待ち to マージ待ち
Actions #14

Updated by toshi_a 初音 over 3 years ago

  • Status changed from マージ待ち to 終了

merged.

Actions #15

Updated by Makoto Kishimoto over 3 years ago

developがruby mikutter.rbで起動できることを確認しました。

Actions

Also available in: Atom PDF