Skip to content

Error uninitialized constant RUBY_LSP_ACTIVATION_SEPARATOR with PowerShell (Windows) #2769

Open
@ynty

Description

@ynty

Description

Ruby LSP Information

Ruby LSP Information

VS Code Version

1.94.2

Ruby LSP Extension Version

0.8.8

Ruby LSP Server Version

Unknown

Ruby LSP Addons

Ruby Version

Unknown

Ruby Version Manager

none

Installed Extensions

Click to expand
  • latex-workshop (10.5.5)
  • vscode-clangd (0.1.29)
  • vscode-language-pack-zh-hans (1.94.2024101609)
  • black-formatter (2024.4.0)
  • debugpy (2024.12.0)
  • pylint (2024.0.0)
  • python (2024.16.1)
  • vscode-pylance (2024.10.1)
  • jupyter (2024.9.1)
  • jupyter-keymap (1.1.2)
  • jupyter-renderers (1.0.19)
  • remote-ssh (0.115.0)
  • remote-ssh-edit (0.87.0)
  • cmake-tools (1.19.52)
  • hexeditor (1.10.0)
  • powershell (2024.2.2)
  • remote-explorer (0.4.3)
  • material-icon-theme (5.12.0)
  • vscode-xml (0.27.1)
  • vscode-yaml (1.15.0)
  • ruby-extensions-pack (0.1.12)
  • ruby-lsp (0.8.8)
  • sorbet-vscode-extension (0.3.37)
  • even-better-toml (0.19.2)
  • cmake (0.0.17)
  • markdown-all-in-one (3.6.2)

Ruby LSP Settings

Click to expand
Workspace
{
  "rubyVersionManager": {
    "identifier": "none"
  }
}
User
{
  "enableExperimentalFeatures": false,
  "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": "none"
  },
  "customRubyCommand": "",
  "formatter": "auto",
  "linters": null,
  "bundleGemfile": "",
  "testTimeout": 30,
  "branch": "",
  "pullDiagnosticsOn": "both",
  "useBundlerCompose": false,
  "bypassTypechecker": false,
  "rubyExecutablePath": "",
  "indexing": {},
  "erbSupport": true
}

Reproduction steps

  1. Start the Ruby LSP using a certain editor on Windows.
  2. Open a Ruby file.
  3. Command ruby -W0 -rjson -e 'STDERR.print("RUBY_LSP_ACTIVATION_SEPARATOR" + { env: ENV.to_h, yjit: !!defined?(RubyVM:: YJIT), version: RUBY_VERSION, gemPath: Gem.path }.to_json + "RUBY_LSP_ACTIVATION_SEPARATOR")' failed and the LSP won't start.

When trying to run this command on PowerShell 7, I get the Error Message:

 ruby -W0 -rjson -e 'STDERR.print("RUBY_LSP_ACTIVATION_SEPARATOR" + { env: ENV.to_h, yjit: !!defined?(RubyVM:: YJIT), version: RUBY_VERSION, gemPath: Gem.path }.to_json + "RUBY_LSP_ACTIVATION_SEPARATOR")'
-e:1:in `<main>': uninitialized constant RUBY_LSP_ACTIVATION_SEPARATOR (NameError)

STDERR.print(RUBY_LSP_ACTIVATION_SEPARATOR + { env: ENV.to_h, yjit: !!defined?(RubyVM:: YJIT), version: RUBY_VERSION, gemPath: Gem.path }.to_json + RUBY_LSP_ACTIVATION_SEPARATOR)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp-wantedExtra attention is neededpinnedThis issue or pull request is pinned and won't be marked as stalevscodeThis pull request should be included in the VS Code extension's release notes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions