ruby-lsp: "Argument list too long" error during Bundler setup

Description

Ruby LSP Information

VS Code Version

1.93.1

Ruby LSP Extension Version

0.8.3

Ruby LSP Server Version

0.19.1

Ruby LSP Addons

Ruby Version

3.3.2

Ruby Version Manager

rbenv

Installed Extensions

Click to expand
  • circleci (2.8.4)
  • doxdocgen (1.4.0)
  • githistory (0.6.20)
  • bats (0.1.10)
  • Kotlin (1.7.1)
  • vscode-docker (1.29.3)
  • vscode-dotnet-runtime (2.1.7)
  • debugpy (2024.10.0)
  • python (2024.14.1)
  • vscode-pylance (2024.10.1)
  • remote-containers (0.388.0)
  • remote-ssh (0.115.0)
  • remote-ssh-edit (0.87.0)
  • remote-wsl (0.88.4)
  • cmake-tools (1.19.52)
  • cpptools (1.21.6)
  • cpptools-extension-pack (1.3.0)
  • cpptools-themes (2.0.0)
  • remote-explorer (0.4.3)
  • vscode-pbkit (0.0.8)
  • platformio-ide (3.3.3)
  • vscode-yaml (1.15.0)
  • ruby-lsp (0.8.3)
  • code-spell-checker (3.0.1)
  • io (3.19.0)
  • cmake (0.0.17)
  • vscode-lldb (1.11.0)
  • vscode-gradle (3.16.4)
  • grammarly (0.24.0)
  • vscode-proto3 (0.5.5)

Ruby LSP Settings

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

Reproduction steps

  1. Open VSCode
  2. Open a Ruby file
  3. Initializing Ruby LSP
  4. Ruby LSP: Indexing files
  5. It gets interrupted due to Server process exited with code 0. (see below)
  6. Go to point 3 - infinite loop ❗

Code snippet or error message

VSCode Output:

Ruby LSP> Skipping custom bundle setup since {redacted}/.ruby-lsp/Gemfile.lock already exists and is up to date
Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: (bundle check || bundle install) 1>&2
The Gemfile's dependencies are satisfied
Initializing Ruby LSP v0.19.1...
Using formatter specified by user: rubocop
Auto detected linters: rubocop
Detected test library: rspec
Finished initializing Ruby LSP!
Running command: `rbenv exec ruby -W0 -rjson -e 'STDERR.print("RUBY_LSP_ACTIVATION_SEPARATOR" + { env: ENV.to_h, yjit: !!defined?(RubyVM:: YJIT), version: RUBY_VERSION }.to_json + "RUBY_LSP_ACTIVATION_SEPARATOR")'` in {redacted} using shell: /bin/zsh
Server process exited with code 0.

The extension status switches between these two:

Image

Image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (17 by maintainers)

Most upvoted comments

btw I have renamed the issue since this isn’t really about formatting.