castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 23 forks source link

[LoadError] cannot load such file -- rdoc #107

Closed nengxu closed 4 years ago

nengxu commented 5 years ago

Running vscode-oss 1.31.1 on Manjaro Linux, vscode-solargraph 0.19.3, solargraph 0.31.3, Ruby 2.6.1p33.

Developer Tools gave the following:

[Extension Host] Error starting Solargraph socket provider Error: [LoadError] cannot load such file -- rdoc at new ResponseError (/home/neng/.vscode/extensions/castwide.solargraph-0.19.3/node_modules/vscode-languageclient/node_modules/vscode-jsonrpc/lib/messages.js:46:28) at handleResponse (/home/neng/.vscode/extensions/castwide.solargraph-0.19.3/node_modules/vscode-languageclient/node_modules/vscode-jsonrpc/lib/main.js:430:48) at processMessageQueue (/home/neng/.vscode/extensions/castwide.solargraph-0.19.3/node_modules/vscode-languageclient/node_modules/vscode-jsonrpc/lib/main.js:258:17) at Immediate.<anonymous> (/home/neng/.vscode/extensions/castwide.solargraph-0.19.3/node_modules/vscode-languageclient/node_modules/vscode-jsonrpc/lib/main.js:242:13) at runCallback (timers.js:696:18) at tryOnImmediate (timers.js:667:5) at processImmediate (timers.js:649:5)

The Problems console gave the following: [Error - 3:44:48 p.m.] Server initialization failed. Message: [LoadError] cannot load such file -- rdoc Code: -32603

nengxu commented 5 years ago

Any idea?

castwide commented 5 years ago

I'm not sure. That particular error is new to me.

One thing you can try is running gem install rdoc. It's not one of Solargraph's direct dependencies, and I'd expect it to be installed by default anyway, but there might be something about your system environment that I haven't taken into account.

castwide commented 5 years ago

Sorry I didn't notice this connection earlier, but this issue appears to be related to a known problem with rdoc on Ruby 2.6.

https://github.com/ruby/rdoc/issues/694

https://github.com/castwide/solargraph/issues/145

Shankar1598 commented 5 years ago

What is the status on this? Am still facing this issue in Manjaro, solargraph 0.20.0, ruby 2.6.3p62

castwide commented 5 years ago

Updating the rdoc gem should work. See #132

Shankar1598 commented 5 years ago

Sorry, I think am facing a different issue. Server initialization failed. [LoadError] cannot load such file -- irb/slex Can you help? Thanks for the quick reply :)

nemya9066 commented 5 years ago

Sorry, I think am facing a different issue. Server initialization failed. [LoadError] cannot load such file -- irb/slex Can you help? Thanks for the quick reply :)

im on manjaro too gem install irb fixed the issue for me