Skip to content
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

Server Initialization failing #1725

Closed
1 task done
bringel opened this issue Oct 19, 2023 · 4 comments
Closed
1 task done

Server Initialization failing #1725

bringel opened this issue Oct 19, 2023 · 4 comments
Labels
bug Something isn't working transferred This issue was transferred from vscode-ruby-lsp

Comments

@bringel
Copy link

bringel commented Oct 19, 2023

Operating System

MacOS 13.6

Ruby version

3.14

Project has a bundle

  • Has bundle

Ruby version manager being used

chruby

Description

I'm opening vscode from my terminal using code .. In the past we've had to do this in order to get our Gemfile recognized properly for this project. Checking the logs for Ruby LSP there isn't anything that stands out to me as a quick fix:

Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Resolving dependencies...
The Gemfile's dependencies are satisfied
bundler: failed to load command: ruby-lsp (/Users/bringel/.gem/ruby/3.1.4/bin/ruby-lsp)
/Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated set 1.0.3, but your Gemfile requires set 1.0.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:25:in `block in setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `map'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `load'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `<main>'
[Error - 11:58:58 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 11:58:58 AM] Connection to server got closed. Server will restart.
true
[Error - 11:58:58 AM] Ruby LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:58:58 AM] Server process exited with code 1.
Ruby LSP> Skipping custom bundle setup since /Users/bringel/development/panorama/nds/.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...
Resolving dependencies......
The Gemfile's dependencies are satisfied
Fetching gem metadata from https://gems.contribsys.com/..
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies.......
Using rake 13.0.6
....
Bundler attempted to update ruby-lsp but its version stayed the same
Bundler attempted to update debug but its version stayed the same
Bundle updated!
bundler: failed to load command: ruby-lsp (/Users/bringel/.gem/ruby/3.1.4/bin/ruby-lsp)
/Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated set 1.0.3, but your Gemfile requires set 1.0.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:25:in `block in setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `map'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `load'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `<main>'
[Error - 11:59:14 AM] Server process exited with code 1.
[Error - 11:59:14 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 11:59:14 AM] Connection to server got closed. Server will restart.
true
[Error - 11:59:14 AM] Ruby LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Error restarting the server: Pending response rejected since connection got disposed
Ruby LSP> Skipping custom bundle setup since /Users/bringel/development/panorama/nds/.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...
Resolving dependencies...
The Gemfile's dependencies are satisfied
bundler: failed to load command: ruby-lsp (/Users/bringel/.gem/ruby/3.1.4/bin/ruby-lsp)
/Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated set 1.0.3, but your Gemfile requires set 1.0.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:25:in `block in setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `map'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `load'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `<main>'
[Error - 11:59:17 AM] Server process exited with code 1.
[Error - 11:59:17 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 11:59:17 AM] Connection to server got closed. Server will restart.
true
[Error - 11:59:17 AM] Ruby LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:59:17 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Ruby LSP> Skipping custom bundle setup since /Users/bringel/development/panorama/nds/.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...
Resolving dependencies...
The Gemfile's dependencies are satisfied
bundler: failed to load command: ruby-lsp (/Users/bringel/.gem/ruby/3.1.4/bin/ruby-lsp)
/Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated set 1.0.3, but your Gemfile requires set 1.0.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:25:in `block in setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `map'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `load'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `<main>'
[Error - 11:59:20 AM] Server process exited with code 1.
[Error - 11:59:20 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 11:59:20 AM] Connection to server got closed. Server will restart.
true
[Error - 11:59:20 AM] Ruby LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:59:20 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Ruby LSP> Skipping custom bundle setup since /Users/bringel/development/panorama/nds/.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...
Resolving dependencies...
The Gemfile's dependencies are satisfied
bundler: failed to load command: ruby-lsp (/Users/bringel/.gem/ruby/3.1.4/bin/ruby-lsp)
/Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated set 1.0.3, but your Gemfile requires set 1.0.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:25:in `block in setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/spec_set.rb:136:in `each'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `map'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/runtime.rb:24:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler.rb:151:in `setup'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:136:in `with_level'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/ui/shell.rb:88:in `silence'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/setup.rb:20:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `require_relative'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:56:in `kernel_load'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /Users/bringel/.gem/ruby/3.1.4/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `load'
	from /Users/bringel/.gem/ruby/3.1.4/bin/bundle:25:in `<main>'
[Error - 11:59:24 AM] Server process exited with code 1.
[Error - 11:59:24 AM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:59:24 AM] The Ruby LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 11:59:24 AM] Ruby LSP client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 11:59:24 AM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
@bringel bringel added the bug Something isn't working label Oct 19, 2023
@vinistock
Copy link
Member

vinistock commented Oct 19, 2023

Thank you for the bug report! I'm seeing the same types of errors on some projects for the uri default gem.

This error is thrown by bundler itself before we get into any LSP code. When we boot the server using bundle exec ruby-lsp, it immediately crashes in bundler internals - even if we didn't get to the point of running any of our code.

There's a little bit more context here rubygems/rubygems#6667.

FWIW, Bundler itself gives two options: update bundler or update the default gem. Updating bundler didn't do anything for me, but updating uri did solve the issue. So maybe you can update set? Or try updating bundler?

@vinistock
Copy link
Member

Actually, scratch that. I think #1125 will fix this.

@bringel
Copy link
Author

bringel commented Oct 20, 2023

Awesome thanks @vinistock, I'll keep an eye out for the release with that PR! Really appreciate y'all being so responsive

@vinistock
Copy link
Member

Talked to @paracycle and @k0kubun and here's a bit more context.

This issue is indeed related to rubygems itself. It requires default gems, such as uri, which may cause a conflict with applications that also require uri, but have the version locked to something other than what rubygems required.

The long term solution, would be to have rubygems vendor the default gems that it needs to function, so that it does not impact applications that also depend on those same gems.

#1125 won't actually fix this. Even if the default gems are added as runtime dependencies, there could still be discrepancies between the version required by rubygems and the version locked by the application.

I believe the only workaround is to indeed update the default gem to the version that gets required by rubygems itself, so that we can avoid a conflict.

@st0012 st0012 transferred this issue from Shopify/vscode-ruby-lsp Mar 18, 2024
@st0012 st0012 added the transferred This issue was transferred from vscode-ruby-lsp label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transferred This issue was transferred from vscode-ruby-lsp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants