-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error uninitialized constant RUBY_LSP_ACTIVATION_SEPARATOR
with PowerShell (Windows)
#2769
Comments
uninitialized constant RUBY_LSP_ACTIVATION_SEPARATOR
with PowerShell (Windows)
I've renamed the issue for easier identification (was previously "The Closed Issue #2592 Can Still be Reproduced"). |
Thank you for the bug report. We never run anything on PowerShell for activation exactly because of escaping issues, so the fact that running the command manually fails on it is expected (we always run on Can you share which errors you see in the |
I'm using rbenv for Windows. It is similar to the rbenv on Unix-like systems but there are still differences, for example it has no
I can only get this under
And I receive an error notification:
|
This comment has been minimized.
This comment has been minimized.
So, there are two issues here: The first one is that the Windows version of Essentially, you need to define what shell script has to be invoked to ensure that the right Ruby environment is activated. {
// Set the manager to custom
"rubyLsp.rubyVersionManager": {
"identifier": "custom",
},
// A shell script that will be executed before trying to invoke Ruby.
// Invoke the Windows version of rbenv here to set the correct environment variables
// for the Ruby version. For example, something like this
"rubyLsp.customRubyCommand": "rbenv activate"
} The second part, which I frankly don't understand as of right now, is the escaping issue. Based on the output you shared, we are not setting any shells to invoke the Ruby command, which should default to using |
Seems that the command was run under
|
I think setting it to I'm not sure how to detect what is the default shell configured in Windows or how to find the exact location of |
Description
Ruby LSP Information
Ruby LSP Information
VS Code Version
1.94.2
Ruby LSP Extension Version
0.8.8
Ruby LSP Server Version
Unknown
Ruby LSP Addons
Ruby Version
Unknown
Ruby Version Manager
none
Installed Extensions
Click to expand
Ruby LSP Settings
Click to expand
Workspace
User
Reproduction steps
ruby -W0 -rjson -e 'STDERR.print("RUBY_LSP_ACTIVATION_SEPARATOR" + { env: ENV.to_h, yjit: !!defined?(RubyVM:: YJIT), version: RUBY_VERSION, gemPath: Gem.path }.to_json + "RUBY_LSP_ACTIVATION_SEPARATOR")'
failed and the LSP won't start.When trying to run this command on PowerShell 7, I get the Error Message:
The text was updated successfully, but these errors were encountered: