プロジェクト

全般

プロフィール

バグ #1576

完了

LoadErrorで起動しない

Makoto Kishimoto さんが約2年前に追加. 約2年前に更新.

ステータス:
終了
優先度:
通常
対象バージョン:
プラグイン名:
クラッシュする:
はい

説明

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ブランチを起動しようとすると起きる


関連するチケット

関連している 提案 #1484: CLIコマンドのプラグインサポート終了toshi_a 初音操作

Izumi Tsutsui さんが約2年前に更新

  • 担当者Makoto Kishimoto にセット

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

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

Makoto Kishimoto さんが約2年前に更新

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

Makoto Kishimoto さんが約2年前に更新

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

toshi_a 初音 さんが約2年前に更新

  • 関連している 提案 #1484: CLIコマンドのプラグインサポート を追加

toshi_a 初音 さんが約2年前に更新

  • クラッシュするいいえ から はい に変更

toshi_a 初音 さんが約2年前に更新

  • 対象バージョン5.0 から 5.1 に変更

Izumi Tsutsui さんが約2年前に更新

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 のブロックより後ろにないとダメ、という気はします。

Shibafu Midorino さんが約2年前に更新

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

Shibafu Midorino さんが約2年前に更新

  • ステータス分類待ち から 実装待ち に変更

Shibafu Midorino さんが約2年前に更新

  • ステータス実装待ち から レビュー待ち に変更
  • ブランチtopic/1576-require-bundler-setup-first にセット

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

Makoto Kishimoto さんが約2年前に更新

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

Izumi Tsutsui さんが約2年前に更新

  • ステータスレビュー待ち から マージ待ち に変更

toshi_a 初音 さんが約2年前に更新

  • ステータスマージ待ち から 終了 に変更

merged.

Makoto Kishimoto さんが約2年前に更新

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

他の形式にエクスポート: Atom PDF