You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add two different Ruby projects to the same workspace (Multi-root Workspace).
Project A has .ruby-version set to 3.0.2.
Project B has .ruby-version set to 3.3.x (or any other version).
Ensure rubyLsp.rubyVersionManager is set to rbenv in User Settings.
Wait for the Ruby LSP server to initialize.
Expected behavior
Ruby LSP should spin up two separate language server processes, each using the Ruby version specified in the respective project's .ruby-version file (leveraging rbenv context).
Actual behavior
Ruby LSP attempts to initialize for both projects using only one Ruby version (usually the one from the first project opened).
In the Output channel for Ruby LSP, I see that it tries to run bundle install or start the server for the second project using the wrong Ruby executable.
Syntax highlighting and constant resonance work for one project but fail for the other with "index out of bounds" or "failed to spawn" errors because of the version mismatch.
If I open these projects in separate VS Code windows, they work perfectly fine.
Description
Ruby LSP Information
VS Code Version
1.121.0
Ruby LSP Extension Version
0.10.4
Ruby LSP Server Version
0.26.9
Ruby LSP Add-ons
Ruby Version
3.0.2
Ruby Version Manager
rbenv
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
{}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": "rbenv" }, "customRubyCommand": "", "formatter": "auto", "linters": null, "bundleGemfile": "", "testTimeout": 30, "pullDiagnosticsOn": "both", "useBundlerCompose": false, "bypassTypechecker": false, "rubyExecutablePath": "", "indexing": {}, "erbSupport": true, "featureFlags": {}, "sigOpacityLevel": "1" }Reproduction steps
Open VS Code.
Add two different Ruby projects to the same workspace (Multi-root Workspace).
Project A has .ruby-version set to 3.0.2.
Project B has .ruby-version set to 3.3.x (or any other version).
Ensure rubyLsp.rubyVersionManager is set to rbenv in User Settings.
Wait for the Ruby LSP server to initialize.
Expected behavior
Ruby LSP should spin up two separate language server processes, each using the Ruby version specified in the respective project's .ruby-version file (leveraging rbenv context).
Actual behavior
Ruby LSP attempts to initialize for both projects using only one Ruby version (usually the one from the first project opened).