Skip to content

Initialize error when switching branches in VS Code #3839

@zarembas

Description

@zarembas

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.105.0

Ruby LSP Extension Version

0.9.32

Ruby LSP Server Version

Unknown

Ruby LSP Add-ons

Ruby Version

3.3.8

Ruby Version Manager

mise

Installed Extensions

Click to expand
  • gitlens (17.7.1)
  • material-icon-theme (5.29.0)
  • ruby-lsp (0.9.32)
  • theme-dracula (2.25.1)
  • vscode-eslint (3.0.16)
  • vscode-fileutils (3.10.3)
  • vscode-pull-request-github (0.120.2)

Ruby LSP Settings

Click to expand
Workspace
{}
User
{
  "enabledFeatures": {
    "codeActions": true,
    "diagnostics": true,
    "documentHighlights": true,
    "documentLink": true,
    "documentSymbols": false,
    "foldingRanges": true,
    "formatting": true,
    "hover": true,
    "inlayHint": true,
    "onTypeFormatting": true,
    "selectionRanges": true,
    "semanticHighlighting": true,
    "completion": true,
    "codeLens": false,
    "definition": true,
    "workspaceSymbol": true,
    "signatureHelp": false,
    "typeHierarchy": false
  },
  "featuresConfiguration": {},
  "addonSettings": {},
  "rubyVersionManager": {
    "identifier": "mise",
    "miseExecutablePath": "/opt/homebrew/bin/mise"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "/Users/seb/Code/ruby-lsp/Gemfile",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true,
  "featureFlags": {},
  "sigOpacityLevel": "1"
}

Reproduction steps

  1. Start the Ruby LSP using a certain editor
  2. Open a Ruby file
  3. Do something
  4. See unexpected behavior

Code snippet or error message

Error processing initialize: /Users/seb/.local/share/mise/installs/ruby/3.3.8/lib/ruby/3.3.0/fileutils.rb:2330:in `unlink': No such file or directory @ apply2files - .ruby-lsp/bundle_env (Errno::ENOENT)
	from /Users/seb/.local/share/mise/installs/ruby/3.3.8/lib/ruby/3.3.0/fileutils.rb:2330:in `block in remove_file'

If I restart the editor it works fine, but when switching branches I randomly get this error.

Metadata

Metadata

Assignees

Labels

StalebugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions