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 failed after 0.18.2 update #2608

Closed
leehericks opened this issue Sep 24, 2024 · 2 comments
Closed

Server initialization failed after 0.18.2 update #2608

leehericks opened this issue Sep 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes

Comments

@leehericks
Copy link

Description

Ruby LSP Information

I can't run the information collection, such a command doesn't appear most likely since the lsp server cannot initialize.

  • Ruby 3.3.5
  • Rails 7.2.1
  • Ruby LSP 0.18.2
2024-09-24 16:30:03.427 [info] (hatake) 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 /Users/leehericks/Developer/hatake using shell: /bin/zsh
2024-09-24 16:30:03.945 [info] (hatake) Ruby LSP> Skipping custom bundle setup since /Users/leehericks/Developer/hatake/.ruby-lsp/Gemfile.lock already exists and is up to date

2024-09-24 16:30:03.952 [info] (hatake) Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: (bundle check || bundle install) 1>&2

2024-09-24 16:30:04.083 [info] (hatake) The Gemfile's dependencies are satisfied

Reproduction steps

This just started happening today, likely after this auto-update.

  1. VSCode starts the Ruby LSP for my Rails 7.2.1 app
  2. Server initialization failed

Code snippet or error message

2024-09-24 16:30:04.566 [info] (hatake) /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/ruby-lsp-0.18.2/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb:34:in `block in <class:RuboCopDiagnostic>': uninitialized constant RubyLsp::Requests::Support::RuboCopDiagnostic::RuboCop (NameError)

        sig { params(document: RubyDocument, offense: RuboCop::Cop::Offense, uri: URI::Generic).void }
                                                      ^^^^^^^
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:360:in `instance_exec'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:360:in `run_builder'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:338:in `run_sig'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:248:in `block in _on_method_added'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:449:in `run_sig_block_for_key'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:469:in `block in run_all_sig_blocks'
	from <internal:kernel>:187:in `loop'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/private/methods/_methods.rb:466:in `run_all_sig_blocks'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/sorbet-runtime-0.5.11581/lib/types/utils.rb:85:in `run_all_sig_blocks'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/ruby-lsp-0.18.2/exe/ruby-lsp:74:in `<top (required)>'
	from /Users/leehericks/.rbenv/versions/3.3.5/bin/ruby-lsp:25:in `load'
	from /Users/leehericks/.rbenv/versions/3.3.5/bin/ruby-lsp:25:in `<top (required)>'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `load'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli/exec.rb:58:in `kernel_load'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in `run'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli.rb:455:in `exec'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli.rb:35:in `dispatch'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/cli.rb:29:in `start'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/exe/bundle:28:in `block in <top (required)>'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from /Users/leehericks/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/bundler-2.5.16/exe/bundle:20:in `<top (required)>'
	from /Users/leehericks/.rbenv/versions/3.3.5/bin/bundle:25:in `load'
	from /Users/leehericks/.rbenv/versions/3.3.5/bin/bundle:25:in `<main>'
@leehericks leehericks added bug Something isn't working vscode This pull request should be included in the VS Code extension's release notes labels Sep 24, 2024
@theodoretliu
Copy link

This may be a duplicate of #2604

@vinistock
Copy link
Member

Yes, this is a duplicate of #2604. I'll close to keep discussions centralized. The fix is in #2610.

@vinistock vinistock closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 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 vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

No branches or pull requests

3 participants