-
Notifications
You must be signed in to change notification settings - Fork 153
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
Unable to run the LSP before doing bundle install #824
Comments
This is expected - you would need to run |
The Ruby LSP should work without a The Ruby LSP connects to your application's dependencies, which would be impossible if you had not generated a That said, I agree with Andy, we can probably display a friendlier message and not crash. |
I think I could help with that, if you're currently accepting PRs. I'm just wondering: this would be merely a message to be printed out to the console if the user calls |
Nevermind what I said here. After some mulling it over, I think I get it. The offer to help with the message still stands, though |
I think the way to go for this one is to raise a more descriptive error when booting the server to warn users they forgot to Basically just check in the executable if |
Alright. Will give it a shot |
Which snippet? |
Damn. I wrote that, gave up on what I was going to say, accidentally submited, forgot to erase lol |
(similar to how SQL, HTML, JS, etc work)
Ruby version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
Code snippet
No response
Description
I'm still unsure if this is a bug, but I haven't found anything in the issues relating to this.
It's a very simple thing. I was trying to configure
ruby-lsp
with sublime following the configuration describede in #559. However, sublime was complaining the language server was crashing. When I tried to run the server in the command line, manually, this is what I got:Since it was complaining that there was no
dependencies
method for nil, I assumed thatBundler.locked_gems
was nil because I had not bundle installed. Indeed, runningbundle install
fixes the issue.Expected output
I'm unsure, honestly. I'm not super familiar on how LSPs are supposed to work, especially a ruby LSP, but I'd kind of expect the LSP not to crash due to missing locked gems, I suppose. Or rather, due to not bundle installing, even because not all ruby projects use Gemfiles and there is the case of when you have a brand new bundler project where you have yet to generate a lockfile.
But, again, I'm not familiar on how these things are supposed to work. Any guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: