Shopify / ruby-lsp-rails

A Ruby LSP addon for Rails
https://shopify.github.io/ruby-lsp-rails/
MIT License
518 stars 21 forks source link

Can't use on windows (due to `setpgrp`) #348

Closed krivospitsky closed 2 months ago

krivospitsky commented 2 months ago

I tried to use ruby-lsp in VSCode on windows and got this error:

ruby/3.2.0/gems/ruby-lsp-rails-0.3.5/lib/ruby_lsp/ruby_lsp_rails/addon.rb:33 run> terminated with exception (report_on_exception is true):
ruby/3.2.0/gems/ruby-lsp-rails-0.3.5/lib/ruby_lsp/ruby_lsp_rails/runner_client.rb:45:in `setpgrp': setpgrp() function is unimplemented on this machine (NotImplementedError)
andyw8 commented 2 months ago

Thanks for the report. This was missed due to https://github.com/Shopify/ruby-lsp-rails/issues/351

andyw8 commented 2 months ago

@krivospitsky I don't have access to a Windows machine, so could you help me by checking something:

Can you clone this repo, then run bin/rails c to start the dummy app, and check if the console successfully starts. In CI it seems to exit right away (look under "Run Tests").

andyw8 commented 2 months ago

(the above is solved by https://github.com/Shopify/ruby-lsp-rails/pull/353)

andyw8 commented 2 months ago

@krivospitsky can you give this branch a try by adding the following to your Gemfile:

gem "ruby-lsp-rails", github: "Shopify/ruby-lsp-rails", branch: "andyw8/fix-ci-setup-for-windows"
andyw8 commented 2 months ago

This should now be working now that https://github.com/Shopify/ruby-lsp-rails/pull/352 is merged. We will make a new release shortly.