ruby-book icon indicating copy to clipboard operation
ruby-book copied to clipboard

Not able to run due to error in solargraph

Open coderhs opened this issue 3 years ago • 5 comments

Wonderfull idea of an extension, looking forward to using it. But when i installed and try running it, I am getting the following error which is not allowing me to proceed.

[Error - 9:54:15 am] Request textDocument/foldingRange failed.
  Message: [Solargraph::FileNotFoundError] Host could not find vscode-notebook-cell:/home/coderhs/sandbox/notebooks/ruby/hello-world.rubybook#ch0000001
  Code: -32603 

image

coderhs avatar May 31 '22 16:05 coderhs

Ack. I have a bunch of Ruby extensions but don't have Solargraph, so thanks for posting this!

One possible reason that I can immediately think of is that VS Code invokes Solargraph for any Ruby code but the Solargraph server only handles Ruby files and not other entities like notebook cells.

I will look into this issue. Unfortunately, it would be difficult for me to look into this until the weekend. I'll try to have an update over the weekend.

If there is a way to disable Solargraph for certain file extensions, then maybe you can try that for now.

rajshah11 avatar Jun 01 '22 03:06 rajshah11

I tried both disabling and uninstalling the solargraph extension.

Without the solargraph extension, the code just hangs. With the extension the error is as reported by @coderhs

I'm on: Windows 10 Ruby 2.6

abhijitnandy avatar Jun 04 '22 17:06 abhijitnandy

@abhijitnandy I am going to look at the issue with solargraph installed. But the issue without solargraph seems strange.

  • Do you have ruby and pry installed?
  • Can you invoke the pry shell by typing pry in command line?

rajshah11 avatar Jun 05 '22 18:06 rajshah11

Yes, have both ruby and pry installed.

[1] pry(main)> puts 'Hello!'
Hello!
=> nil
[2] pry(main)>

abhijitnandy avatar Jun 05 '22 21:06 abhijitnandy

@abhijitnandy This extension spawns a Node.JS child process to run pry in the background. Looks like those don't work well with Windows systems. I am thinking of changing the extension architecture to a client-(pry) server model so that it works on Windows as well. But till then UNFORTUNATELY will have to make this a Mac only extension. I have updated the README as well. Sorry for the inconvenience.

@coderhs Created an issue with Solargraph for the error.

rajshah11 avatar Jun 11 '22 07:06 rajshah11