Skip to content

Fails to detect ruby and confusing error "No workspace found" in sentry-ruby devcontainer #3464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
solnic opened this issue May 8, 2025 · 1 comment
Labels
bug Something isn't working help-wanted Extra attention is needed

Comments

@solnic
Copy link

solnic commented May 8, 2025

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:

Image

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"
}
@solnic solnic added the bug Something isn't working label May 8, 2025
@solnic
Copy link
Author

solnic commented May 8, 2025

@vinistock you pinged me to report it so here it is - thanks for helping out!

@st0012 it's our sentry setup so maybe you could have some extra insights? 😄

@egiurleo egiurleo added the help-wanted Extra attention is needed label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants