castwide / vscode-solargraph

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

Extension always breaksand fails #133

Closed oldlonecoder closed 4 years ago

oldlonecoder commented 5 years ago

Issue Type: Bug

Solargraph awlays fail to start.

Extension version: 0.20.0 VS Code version: Code - OSS 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-09T11:32:10.645Z) OS version: Linux x64 5.2.1-arch1-1-ARCH

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 x 3907)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|0, 1, 1| |Memory (System)|23.47GB (0.42GB free)| |Process Argv|--unity-launch| |Screen Reader|no| |VM|0%|
castwide commented 5 years ago

Do you get any error messages? Is there a stack trace in the developer console?

thedanbob commented 4 years ago

I'm having the same problem, solargraph fails to start in every ruby project. Extension version 0.21.1, VSCodium 1.41.0. Also on Arch Linux.

In the output I get

[Error - 10:09:38 AM] Starting client failed
Error: spawn solargraph ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)

And a popup saying

Solargraph gem not found. Run `gem install solargraph` or update your Gemfile.

I have the solargraph gem installed, version 0.38. If I change the transport setting to external and run solargraph socket in the project directory it works without issue.

castwide commented 4 years ago

Are you using rvm, rbenv, or some other version manager for Ruby?

What shell do you use on the command line? The extension will typically try to start processes with either bash or zsh, depending on your configuration. Other shells might not work correctly.

You can see if VS Code is running in the same environment as your terminal by starting it from the command line, e.g., run code . from your project directory.

thedanbob commented 4 years ago

Aha! Your comment put me on the right track, it was rbenv. Running code . like you suggested worked. To get it working otherwise I just had to change the command path to /home/<user>/.rbenv/shims/solargraph. Thanks!

season-x commented 4 years ago

Aha! Your comment put me on the right track, it was rbenv. Running code . like you suggested worked. To get it working otherwise I just had to change the command path to /home/<user>/.rbenv/shims/solargraph. Thanks!

your system is Linux?win? I have same error. [Error - 上午11:01:26] Starting client failed Error: spawn C:/Users/season/.vscode/extensions/castwide.solargraph-0.21.1/ ENOENT at notFoundError (c:\Users\season.vscode\extensions\castwide.solargraph-0.21.1\node_modules\cross-spawn\lib\enoent.js:6:26) at verifyENOENT (c:\Users\season.vscode\extensions\castwide.solargraph-0.21.1\node_modules\cross-spawn\lib\enoent.js:40:16) at ChildProcess.cp.emit (c:\Users\season.vscode\extensions\castwide.solargraph-0.21.1\node_modules\cross-spawn\lib\enoent.js:27:25) at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

thedanbob commented 4 years ago

Linux, I'm afraid I don't know how to fix it on Windows.

season-x commented 4 years ago

Linux, I'm afraid I don't know how to fix it on Windows.

thanks for your reply,but I was successed to change the 'command path' on windows too.

nguyenbs commented 1 year ago

I'm stuck in to the same error. [Error - 11:50:26 PM] Starting client failed Error: spawn solargraph ENOENT at notFoundError (c:\Users\buisy\.vscode\extensions\castwide.solargraph-0.24.0\node_modules\ruby-spawn\node_modules\cross-spawn\lib\enoent.js:6:26) at verifyENOENT (c:\Users\buisy\.vscode\extensions\castwide.solargraph-0.24.0\node_modules\ruby-spawn\node_modules\cross-spawn\lib\enoent.js:40:16) at cp.emit (c:\Users\buisy\.vscode\extensions\castwide.solargraph-0.24.0\node_modules\ruby-spawn\node_modules\cross-spawn\lib\enoent.js:27:25) at ChildProcess._handle.onexit (node:internal/child_process:293:12) Any one solved it on Windows 10?