castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
424 stars 25 forks source link

Solargraph Request textDocument/hover failed #53

Closed rhymes closed 6 years ago

rhymes commented 6 years ago

I can't get solargraph to work at all :( I'm getting this error:

[Error - 4:06:03 PM] Request textDocument/hover failed.
  Message: [TypeError] no implicit conversion of Solargraph::Workspace into String
  Code: -32603 

solargraph 0.21.0 ruby 2.5.1 VSCode 1.23.0

castwide commented 6 years ago

There appear to be problems running the Solargraph gem with Ruby 2.5. Tests have been updated to include it. Issues with 2.5 are being tracked at castwide/solargraph#55.

castwide commented 6 years ago

@rhymes Are you using the Runtime plugin? i.e., this configuration in a .solargraph.yml file:

plugins:
- runtime

The Runtime plugin is still experimental, and I recently found a bug in it that might cause the Solargraph::Workspace error you're seeing.

rhymes commented 6 years ago

@castwide you were right, I removed that line and I stopped seeing the error. Still it won't work with Ruby 2.5. I'll wait for the next compatible release then

castwide commented 6 years ago

One more thing you can try. The gem ships with core documentation for Ruby 2.2.2. You can update to a newer version by running solargraph download-core. That should get you the documentation for the closest version it can find, which is currently 2.4.2...not a perfect match, but it might help. A download for 2.5.1 documentation is forthcoming.

castwide commented 6 years ago

Gem version 0.21.1 is published with fixes for Ruby 2.5.1 compatibility. Core documentation for 2.5.1 is also available via solargraph download-core.

rhymes commented 6 years ago

Seems to be working for me @castwide and it's awesome! Thank you!