Bundler settings containing spaces are rewritten with colons when composing the bundle
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
SetupBundler#bundler_settings_as_envから始め、Bundlerの設定を環境変数に変換する方法を調べてください。issueにある手順 bundle config set --local path "vendor/my bundle" で再現し、合成されたbundleのパスに空白が保持され、リスト設定も引き続き機能することを確認してください。パスが保持され、報告されたパス区切り文字のエラーでサーバーが終了しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
SetupBundler#bundler_settings_as_env passes every Bundler setting to the composed bundle's bundle install as an environment variable, and runs every value through .tr(" ", ":"):
value = Array(settings[e]).join(":").tr(" ", ":")
That suits list settings like without, but it also rewrites file paths. A path setting that contains a space ends up pointing at a path that doesn't exist, and the server fails to start.
We hit it with BUNDLE_SSL_CA_CERT. Aikido's endpoint agent on macOS sets it to /Library/Application Support/AikidoSecurity/EndpointProtection/run/endpoint-protection-ruby-combined-ca.pem. The composed bundle gets /Library/Application:Support/..., so whenever it needs to fetch a gem, bundle install fails with:
OpenSSL::X509::StoreError: X509_LOOKUP_load_file: BIO lib
Claude code shows the error as:
Language server "plugin:ruby-lsp:ruby-lsp" couldn't start. The Errors tab in /plugin may have the reason.
plugin:ruby-lsp:ruby-lsp @ unknown (user)
LSP server plugin:ruby-lsp:ruby-lsp crashed with exit code 1
A plain bundle install in the same shell works.
Ruby LSP Information
- ruby-lsp 0.26.11
- Bundler 4.0.20, Ruby 3.4.12, macOS
- Editor: Claude Code, which runs
ruby-lspdirectly. The failure is in the server's bundle setup, so the editor shouldn't matter.
Reproduction steps
A path setting shows it without any certificate setup:
mkdir lsp-space && cd lsp-space
printf 'source "https://rubygems.org"\ngem "rake"\n' > Gemfile
bundle lock
bundle config set --local path "vendor/my bundle"
ruby-lsp < /dev/null
The composed bundle installs into vendor/my:bundle, then the server exits with status 13:
Bundled gems are installed into `./vendor/my:bundle`
Your bundle path contains text matching ":", which is the path separator for
your system. Bundler cannot function correctly when the Bundle path contains the
system's PATH separator. Please change your bundle path to not match ":".
Suggested fix
Drop the .tr(" ", ":"). Bundler::Settings#[] already returns an array for list settings, because to_array splits on spaces and colons. So .join(":") alone gives development:test for BUNDLE_WITHOUT="development test" and leaves vendor/my bundle unchanged. The .tr came in with #2595.
- 主要言語
- Ruby
- スター
- 2k
- フォーク
- 300
- 平均マージ
- 2時間 54分
- マージ済み PR(30日)
- 9
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/ruby-lsp のほかの issue
-
Dependencies view: `getParent` loops forever on untitled documents, extension host runs out of memory対応中かも @efegokdemir が 44 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
Linux file system with square brackets in the directory/filename are failing to be indexed対応中かも @andriytyurnikov が 249 日前に担当しました。 オープンbug help-wanted pinned
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Shopify/ruby-lsp#3503 · コメント 9 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
Composed bundle rewrites project binstubs when Bundler bin is set対応中かも @efegokdemir が 1 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
Shopify/ruby-lsp の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TarteelAI/quranic-universal-library#1111 ·
メンテナーはふだん 1 日以内に返信
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every command対応中かも @k4kratik が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sachincool/cruft#4 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
riscv/riscv-unified-db#2859 ·
メンテナーはふだん 2 日以内に返信
-
agent-driven deployment documentation future releases nice to have
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
changesets
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openstreetmap/openstreetmap-website#7629 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信