rajshah11 / ruby-book

A basic notebook interface for Ruby code
MIT License
19 stars 0 forks source link

Not able to run due to error in solargraph #1

Open coderhs opened 2 years ago

coderhs commented 2 years ago

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

rajshah11 commented 2 years ago

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.

abhijitnandy commented 2 years ago

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

rajshah11 commented 2 years ago

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

abhijitnandy commented 2 years ago

Yes, have both ruby and pry installed.

[1] pry(main)> puts 'Hello!'
Hello!
=> nil
[2] pry(main)>
rajshah11 commented 2 years ago

@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.