Skip to content
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

Can you use this on windows? Or is this only for VSCode on Linux? #1942

Closed
BerndHme opened this issue Apr 15, 2024 · 3 comments · Fixed by #1967
Closed

Can you use this on windows? Or is this only for VSCode on Linux? #1942

BerndHme opened this issue Apr 15, 2024 · 3 comments · Fixed by #1967

Comments

@BerndHme
Copy link

Can you use this on windows? Or is this only for VSCode on Linux?

I'm trying to get a ruby set up working on windows11, but vscode keeps asking for a version manager.
The vscode documentation refers to rbenv, but this seems to be only for unix?

I installed rbenv for windows
https://www.ruby-lang.org/en/documentation/installation/#rbenv:~:text=like%20operating%20systems.-,rbenv%20for%20Windows,-rbenv%20for%20Windows

but this doesn't work.

What can I use for support on Windows?

@vinistock
Copy link
Member

Thank you for the bug report! Yes, this extension can be used with Windows. The majority of version managers do not support Windows unfortunately (I'm not 100% sure what's the situation with rbenv, but I was under the impression it doesn't support it).

I'm not a Windows user, but it seems that the common way to install Ruby on Windows is RubyInstaller, which we do support activation for.

Do you already have Ruby installed in your machine?

@BerndHme
Copy link
Author

Yes I have ruby installed with the RubyInstaller for windows.
https://rubyinstaller.org/

these are the settings.
"[ruby]": { "editor.defaultFormatter": "Shopify.ruby-lsp", "editor.formatOnSave": true, "editor.formatOnType": true, "editor.tabSize": 2, "editor.insertSpaces": true, "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "files.trimFinalNewlines": true, "editor.semanticHighlighting.enabled": true, "editor.rulers": [ 120 ] }, "rubyLsp.rubyVersionManager": { "identifier": "rubyInstaller" },

It asks me about a .ruby-version file.

image

I understand that you could create a version file with rbenv
... but this is not applicable then I guess.

@vinistock
Copy link
Member

The Ruby LSP can found the Ruby installation automatically, but it needs some way to know which Ruby version should be used for the project. If you don't have/don't want to add a .ruby-version file, then this PR #1967 will allow configuring a Ruby installation manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants