Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Paths need to be escaped

未关闭
#4,223 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Vraiment 已经在做这个了。

开始于 2026年10月5日。

  • #4224 来自 @Vraiment —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby

调研方向

Start by tracing how the test command is assembled, using the paths to minitest_reporter.rb, test_unit_reporter.rb, and the RSpec spec file shown in the reproduction. Reproduce the failure in a gem directory containing a space, then verify that running the test succeeds with paths handled correctly; a linked pull request is already open.

由索引模型根据 Issue 内容生成。

描述

bug
Description
Ruby LSP Information
VS Code Version

1.140.0

Ruby LSP Extension Version

0.10.6

Ruby LSP Server Version

0.26.11

Ruby LSP Add-ons
  • RuboCop (1.91.0)
Ruby Version

4.0.7

Ruby Version Manager

rbenv

Reproduction steps
  1. Create a gem in a directory with a space: mkdir 'some directory' && cd 'some directory' && bundle gem my_gem'
  2. Ensure gems are installed within the directory: bundle config set --local path tmp/vendor/bundle
  3. Add RSpec as a dependency
  4. Open the Gem with VSCode
  5. Add an RSpec test
  6. Execute the test
  7. It will fail to execute

Code snippet or error message

Running tests with command:
"bundle exec ruby -r$HOME/some directory/my_gem/tmp/vendor/bundle/ruby/4.0.0/gems/ruby-lsp-0.26.11/lib/ruby_lsp/test_reporters/minitest_reporter.rb -r$HOME/some directory/my_gem/tmp/vendor/bundle/ruby/4.0.0/gems/ruby-lsp-0.26.11/lib/ruby_lsp/test_reporters/test_unit_reporter.rb -Ispec $HOME/some\ directory/my_gem/spec/my_gem/json_analyzer_spec.rb --name "/^MyGem#testing\$/""

$HOME/.rbenv/versions/4.0.7/bin/ruby: No such file or directory -- directory/my_gem/tmp/vendor/bundle/ruby/4.0.0/gems/ruby-lsp-0.26.11/lib/ruby_lsp/test_reporters/minitest_reporter.rb (LoadError)

Test run cancelled.

Note the error message: No such file or directory -- directory/my_gem/... it means the actual issue is a space on the gem search path rather than a space on the gem itself.

主要语言
Ruby
星标
2k
派生
284
平均合并
11 小时 11 分钟
30 天内合并 PR
10

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Shopify/ruby-lsp 的其他 Issue

查看 Shopify/ruby-lsp 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。