Fails to detect ruby and confusing error "No workspace found" in sentry-ruby devcontainer
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 2h 14m
- Merged PRs (30d)
- 6
Description
Description
Following up after https://bsky.app/profile/solnic.dev/post/3loix6q4xr62e
Reproduction steps
git clone https://github.com/getsentry/sentry-ruby.git
cd sentry-ruby
cp .devcontainer/.env.example .devcontainer/.env
code .
Then re-open in the devcontainer - our config is in .devcontainers dir. By default, the container is set up to grab bitnami/ruby docker image. Ruby is installed here:
$ which ruby
/opt/bitnami/ruby/bin/ruby
This bin dir is in the PATH:
$ env | grep PATH | grep bitnami
PATH=/home/sentry/.bin:/vscode/vscode-server/bin/linux-arm64/17baf841131aa23349f217ca7c570c76ee87b957/bin/remote-cli:/home/sentry/.bin:/opt/bitnami/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workspace/gems/3.4.2/bin:/home/sentry/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand
Fails to run a test with confusing error
When trying to run a test, I get this:
Expected Result
Either of the two:
- IF it really cannot work with ruby under custom bin path, I would really expect to get a clear warning message that Ruby LSP did not manage to figure out where the ruby exec is, instead of "No workspace found" when running tests
OR, preferably:
- Fix it to actually detect properly where ruby exec is - it's in the PATH, there's no ruby version manager involved, it's the simplest use-case scenario, so it'd be great if it just worked OOTB
Ruby LSP Information
VS Code Version
1.99.3
Ruby LSP Extension Version
0.9.21
Ruby LSP Server Version
0.23.17
Ruby LSP Add-ons
- Ruby LSP RSpec
- RuboCop
Ruby Version
3.4.2
Ruby Version Manager
auto
Installed Extensions
Click to expand
- copilot (1.314.0)
- copilot-chat (0.26.7)
- magit (0.6.66)
- ruby-lsp (0.9.21)
- vscode-augment (0.436.0)
- vscode-fileutils (3.10.3)
- vscode-pull-request-github (0.109.2025041004)
Ruby LSP Settings
Click to expand
Workspace
{
"rubyVersionManager": {
"identifier": "auto"
},
"formatter": "rubocop"
}
User
{
"enabledFeatures": {
"codeActions": true,
"diagnostics": true,
"documentHighlights": true,
"documentLink": true,
"documentSymbols": true,
"foldingRanges": true,
"formatting": true,
"hover": true,
"inlayHint": true,
"onTypeFormatting": true,
"selectionRanges": true,
"semanticHighlighting": true,
"completion": true,
"codeLens": true,
"definition": true,
"workspaceSymbol": true,
"signatureHelp": true,
"typeHierarchy": true
},
"featuresConfiguration": {},
"addonSettings": {},
"rubyVersionManager": {
"identifier": "auto"
},
"customRubyCommand": "",
"formatter": "rubocop",
"linters": null,
"bundleGemfile": "",
"testTimeout": 30,
"branch": "",
"pullDiagnosticsOn": "both",
"useBundlerCompose": false,
"bypassTypechecker": false,
"rubyExecutablePath": "",
"indexing": {},
"erbSupport": true,
"featureFlags": {},
"sigOpacityLevel": "1"
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the sentry-ruby steps, .devcontainer/.env.example, and the reported PATH containing /opt/bitnami/ruby/bin. Inspect Ruby LSP's Ruby executable detection and test-running entry point, then verify that this setup either detects Ruby successfully or reports a clear Ruby detection error instead of "No workspace found".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, ruby, vscode
- Domain
- devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100