Bundler settings containing spaces are rewritten with colons when composing the bundle

Aperta Adatta ai principianti
#4,275 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@efegokdemir ci sta già lavorando.

Dal 18/11/2026.

  • #4278 di @efegokdemir — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
ruby
Ambito
tooling

Direzione di ricerca

Inizia da SetupBundler#bundler_settings_as_env e controlla come converte le impostazioni di Bundler in variabili d’ambiente. Riproduci il problema con i passaggi bundle config set --local path "vendor/my bundle" dell’issue, poi verifica che il bundle composto mantenga lo spazio nel percorso e che le impostazioni di tipo elenco continuino a funzionare. Il lavoro è concluso quando il percorso viene mantenuto e il server non si arresta più con l’errore di separatore del percorso segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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-lsp directly. 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.

Lingua principale
Ruby
Stelle
2k
Fork
300
Merge medio
2h 54m
PR unite (30g)
9

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Shopify/ruby-lsp

Tutte le issue di Shopify/ruby-lsp

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.