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 分钟
- 30 天内合并 PR
- 9
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 个 reaction ·
维护者通常 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 天内回复
相似的 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 天内回复