-
Notifications
You must be signed in to change notification settings - Fork 178
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
Ruby LSP: indexing files: 0% completed hangs forever #2288
Comments
Hi @argent-smith, can you try running |
And also check for any errors in the Ruby LSP output panel. |
Hi @andyw8, ruby-lsp-doctor doesn't hang
|
@andyw8 also, this works fine:
|
@andyw8 thank you for the point. I've found and fixed the problem! Thanks to all the contributors for a great tool! |
Fixed |
Note: The |
I was having the same
I run Our issue: we needed to upgrade Note: I attempted to upload screenshots, but for some reason it's not working at the moment. |
A senior dev helped me fix it, here's what he did: First we went to the output tab on vscode, and then selected Ruby LSP in the accordion top right. We saw that a gem couldn't be installed. Then we went to Preferences: Open Settings (UI), clicked the extensions tab, then Ruby LSP tab, then we saw that the Bundle Gemfile field waws filled with a path. This should've been empty, but our company configured it to a path, so normal ruby or rails projects couldn't use Ruby LSP. |
I'm getting a similar issue. Ruby LSP fail to start because it can load a gem required by a rubocop config in a parent folder which shouldn't even be in use since to project has its own. Either way, the gem is installed for the ruby version in use. They are not installed in the current bundle though.
|
Moved my default config to |
Bundler doesn't allow you to require any gems that aren't a part of the bundle. It explicitly sets up the It doesn't matter if they are in a separate Gemfile that you evaluate from the main Gemfile or any other structure, but they need to be a part of the bundle. |
I had a similar issue running The harder part was that In the end, the problem was that Removing that line solved the issue, or even removing the |
@mrbongiolo that's interesting, did you notice if you had anything printed to the output tab? I can understand the linting/formatting not working under those conditions, but if indexing broke too there's a chance that we're not handling errors gracefully somewhere. Is having a |
@vinistock Doing some tests here. A simple test case is having such a
And a # Omakase Ruby styling for Rails
inherit_gem: { rubocop-rails-omakase: rubocop.yml } When I open the The logs show this:
The LSP info display this:
It's kinda weird that running ❯ ~/.local/share/nvim/mason/bin/ruby-lsp --doctor
Ruby LSP> Skipping custom bundle setup since /home/mrbongiolo/projects/ruby-lab/.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 _2.5.22_ check || bundle _2.5.22_ install) 1>&2
The Gemfile's dependencies are satisfied
Globbing for indexable files
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/English.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/abbrev.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/base64.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/benchmark.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/bigdecimal/jacobian.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/bigdecimal/ludcmp.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/bigdecimal/math.rb
indexing: /home/mrbongiolo/.asdf/installs/ruby/3.3.5/lib/ruby/3.3.0/bigdecimal/newton.rb
# and many other files until it seems to execute successfully I don't have vscode currently installed on my Windows setup to try to replicate there. |
Description
Hi. On my project, I see "Ruby LSP: indexing files: 0% completed" notification and progress spinner — they stay forever
Configuration:
VScode 1.91.0
Ruby LSP plugin v0.7.11
ruby-lsp in the project's bundle 0.17.6
The text was updated successfully, but these errors were encountered: