-
Notifications
You must be signed in to change notification settings - Fork 174
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
Failed to activate custom environment: Command failed... #1175
Comments
Thank you for the bug report! The second option is the right approach, just pushing something into the PATH. It looks like the output was a bit too long for the VS Code dialogue box. I can't see what the actual error was, just parts of the JSON. If you look at the |
Currently encountering the same issue. Is there a workaround, or a way to provide more information on the issue? OS: Windows 10 |
Same error here, seems to be started after update VsCode from 1.83 to 1.84. I tried to create a Custom batch file to configure the PATH to my customized ruby wrapper, but seems that isn't running it. the output is: Failed to activate custom environment: Command failed: s:\bat\CustomRubyPath.bat && ruby -rjson -e "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, |
Note: extension version |
I am struggling too: Everytime I boot up vscode I get this error: Failed to activate custom environment: Command failed: && ruby -rjson -e "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))" && was unexpected at this time. Spent hours troubleshooting with chatgpt and still no success. Any help appreciated |
The changes in Shopify/vscode-ruby-lsp#904 should fix this issue. Thank for reporting. |
Version v0.4.18 should fix this. Please let us know if you find any other issues. |
works fine!!!! 2023-11-20 13:28:02.521 [info] Trying to activate Ruby environment with command: s:\bat\CustomRubyPath.bat && ruby -rjson -e "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))" inside directory: s:\BAT |
Yay!!! It works 💯 🔥A small note but important: If anyone receives error like
|
Ruby version
3.2.2
Code snippet
No response
Description
OS: Windows 10
Code editor: VSCode
Ruby version: 3.2.2
Ruby version manager: custom (I got none, so I put it as a custom, like the documentation suggests.)
I wanted to ensure that the issues were not exclusive to my computer but were widespread. I contacted a buddy who also uses Windows 10 to configure Ruby LSP, and he confirmed (with screenshots 😄) that he receives the same issues.
First approach:
With these two lines of code in JSON configuration settings:
I receive the following error:
Second approach:
Now, with these two lines of code:
I get the following error (it seems like it successfully extracts the data of ruby/bin in JSON format but still doesn't start LSP):
What can I do to make this work? Thank you in advance.
Expected output
I expect Ruby LSP to operate and start properly.
The text was updated successfully, but these errors were encountered: