Giter Club home page Giter Club logo

Comments (2)

olivierlacan avatar olivierlacan commented on August 23, 2024

After re-reading the output I'm wondering if it's that single liner that has an unforeseen exception when ruby-lsp-rails is present but not ruby-lsp:

((bundle check && bundle update ruby-lsp ruby-lsp-rails) || bundle install) 1>&2

But I might have have some cofounding factor because I couldn't get it to error, at least not directly (outside of VSCode):

$ cd .ruby-lsp
$ gem uninstall -a ruby-lsp

You have requested to uninstall the gem:
	ruby-lsp-0.16.6

ruby-lsp-rails-0.3.6 depends on ruby-lsp (>= 0.16.5, < 0.17.0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Remove executables:
	ruby-lsp, ruby-lsp-check, ruby-lsp-doctor

in addition to the gem? [Yn]  y
Removing ruby-lsp
Removing ruby-lsp-check
Removing ruby-lsp-doctor
Successfully uninstalled ruby-lsp-0.16.6
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      psych (>= 4.0.0)
      Available/installed versions of this gem:
      - 5.1.2
      - 5.1.1.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

$ ((bundle check && bundle update ruby-lsp ruby-lsp-rails) || bundle install) 1>&2
The following gems are missing
 * ruby-lsp (0.16.6)
Install missing gems with `bundle install`
Fetching gem metadata from https://rubygems.org/.........
Fetching ruby-lsp 0.16.6
Installing ruby-lsp 0.16.6
Bundle complete! 18 Gemfile dependencies, 89 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

But guess what? Once I'm in the halfway state after gem uninstall -a ruby-lsp, the Ruby LSP: Restart command in VSCode does reproduce my issue:

2024-05-04 12:57:22.908 [info] (rails-new-7-1-3-2-tailwind) Shutting down Ruby LSP...

2024-05-04 12:57:22.908 [info] (rails-new-7-1-3-2-tailwind) Ruby LSP Rails shutting down server

2024-05-04 12:57:23.414 [info] (rails-new-7-1-3-2-tailwind) Shutdown complete with status 0

2024-05-04 12:57:23.451 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:23 PM] Server process exited with code 0.
2024-05-04 12:57:23.954 [info] (rails-new-7-1-3-2-tailwind) Ruby LSP> Skipping custom bundle setup since /Users/olivierlacan/Development/sandbox/rails-new-7-1-3-2-tailwind/.ruby-lsp/Gemfile.lock already exists and is up to date

2024-05-04 12:57:23.958 [info] (rails-new-7-1-3-2-tailwind) Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: (bundle check || bundle install) 1>&2

2024-05-04 12:57:24.078 [info] (rails-new-7-1-3-2-tailwind) The Gemfile's dependencies are satisfied

2024-05-04 12:57:24.396 [info] (rails-new-7-1-3-2-tailwind) Initializing Ruby LSP v0.16.6...

2024-05-04 12:57:24.417 [info] (rails-new-7-1-3-2-tailwind) Finished initializing Ruby LSP!

2024-05-04 12:57:24.447 [info] (rails-new-7-1-3-2-tailwind) Activating Ruby LSP Rails addon v0.3.6

2024-05-04 12:57:24.455 [info] (rails-new-7-1-3-2-tailwind) Ruby LSP Rails booting server

2024-05-04 12:57:25.150 [info] (rails-new-7-1-3-2-tailwind) Finished booting Ruby LSP Rails server

2024-05-04 12:57:47.955 [info] (rails-new-7-1-3-2-tailwind) Shutting down Ruby LSP...

2024-05-04 12:57:47.957 [info] (rails-new-7-1-3-2-tailwind) Ruby LSP Rails shutting down server

2024-05-04 12:57:48.473 [info] (rails-new-7-1-3-2-tailwind) Shutdown complete with status 0

2024-05-04 12:57:48.504 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Server process exited with code 0.
2024-05-04 12:57:48.749 [info] (rails-new-7-1-3-2-tailwind) rbenv: ruby-lsp: command not found

2024-05-04 12:57:48.813 [info] (rails-new-7-1-3-2-tailwind) 
The `ruby-lsp' command exists in these Ruby versions:

2024-05-04 12:57:48.816 [info] (rails-new-7-1-3-2-tailwind)   3.1.2
  3.2.0
  3.2.1
  3.2.2

2024-05-04 12:57:48.816 [info] (rails-new-7-1-3-2-tailwind) 

2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Server process exited with code 127.
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Server initialization failed.
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind) [Info  - 12:57:48 PM] Connection to server got closed. Server will restart.
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind) true
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Ruby LSP client: couldn't create connection to server.
2024-05-04 12:57:48.817 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:48.851 [info] (rails-new-7-1-3-2-tailwind) rbenv: ruby-lsp: command not found

2024-05-04 12:57:48.905 [info] (rails-new-7-1-3-2-tailwind) 
The `ruby-lsp' command exists in these Ruby versions:

2024-05-04 12:57:48.906 [info] (rails-new-7-1-3-2-tailwind)   3.1.2
  3.2.0
  3.2.1
  3.2.2

2024-05-04 12:57:48.906 [info] (rails-new-7-1-3-2-tailwind) 

2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Server process exited with code 127.
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Server initialization failed.
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind) [Info  - 12:57:48 PM] Connection to server got closed. Server will restart.
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind) true
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:48 PM] Ruby LSP client: couldn't create connection to server.
2024-05-04 12:57:48.907 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:48.908 [error] (rails-new-7-1-3-2-tailwind) Error starting the server: Pending response rejected since connection got disposed
2024-05-04 12:57:48.942 [info] (rails-new-7-1-3-2-tailwind) rbenv: ruby-lsp: command not found

2024-05-04 12:57:48.999 [info] (rails-new-7-1-3-2-tailwind) 
The `ruby-lsp' command exists in these Ruby versions:

2024-05-04 12:57:49.000 [info] (rails-new-7-1-3-2-tailwind)   3.1.2
  3.2.0
  3.2.1
  3.2.2


2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server process exited with code 127.
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server initialization failed.
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Info  - 12:57:49 PM] Connection to server got closed. Server will restart.
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) true
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Ruby LSP client: couldn't create connection to server.
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Restarting server failed
2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.034 [info] (rails-new-7-1-3-2-tailwind) rbenv: ruby-lsp: command not found

2024-05-04 12:57:49.091 [info] (rails-new-7-1-3-2-tailwind) 
The `ruby-lsp' command exists in these Ruby versions:

2024-05-04 12:57:49.093 [info] (rails-new-7-1-3-2-tailwind)   3.1.2
  3.2.0
  3.2.1
  3.2.2

2024-05-04 12:57:49.093 [info] (rails-new-7-1-3-2-tailwind) 

2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server process exited with code 127.
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server initialization failed.
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) [Info  - 12:57:49 PM] Connection to server got closed. Server will restart.
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) true
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Ruby LSP client: couldn't create connection to server.
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Restarting server failed
2024-05-04 12:57:49.094 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.128 [info] (rails-new-7-1-3-2-tailwind) rbenv: ruby-lsp: command not found

2024-05-04 12:57:49.180 [info] (rails-new-7-1-3-2-tailwind) 
The `ruby-lsp' command exists in these Ruby versions:

2024-05-04 12:57:49.181 [info] (rails-new-7-1-3-2-tailwind)   3.1.2
  3.2.0
  3.2.1
  3.2.2

2024-05-04 12:57:49.181 [info] (rails-new-7-1-3-2-tailwind) 

2024-05-04 12:57:49.182 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server process exited with code 127.
2024-05-04 12:57:49.182 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server initialization failed.
2024-05-04 12:57:49.182 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.182 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] The Ruby LSP server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2024-05-04 12:57:49.183 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Ruby LSP client: couldn't create connection to server.
2024-05-04 12:57:49.183 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-05-04 12:57:49.183 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Restarting server failed
2024-05-04 12:57:49.183 [info] (rails-new-7-1-3-2-tailwind)   Message: Pending response rejected since connection got disposed
  Code: -32097 

Oddly the rbenv: ruby-lsp: command not found that happens at 2024-05-04 12:57:48.749 seems to occur after a second reboot cycle? Not quite sure what to make of that.

PS: As a sidenote, it seems like all these logs are going to [info] when they're in fact errors. I saw you had an issue with STDERR and other extensions, but it's a bit odd to see lines like these:

2024-05-04 12:57:49.001 [info] (rails-new-7-1-3-2-tailwind) [Error - 12:57:49 PM] Server initialization failed.

from ruby-lsp.

vinistock avatar vinistock commented on August 23, 2024

Thank you for the bug report! I think this was fixed by #2012. If you had ruby-lsp-rails installed, but not ruby-lsp, we were mistakenly considering that ruby-lsp was installed and bypassing the gem install ruby-lsp call.

It will be included in our next release.

from ruby-lsp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.