Once you’ve installed Ruby on your machine, you want to get it ready to work in Visual Studio Code.
You will want to install an Extension. So go to the Extensions menu, and search for: “Ruby LSP”. There use to be a Ruby extension, however it was deprecated, and this one was suggested.
I’ve installed it here. You can see it has a good backer (Shopify), however it’s rating isn’t great, but probably fine for what we’re doing.
If you don’t like this one, there are several other extensions you can look into.
There are other extensions you can install if you want, however we’ll start with this one only.
Alternative Compiler
Of course, there is an alternative compiler. One that you don’t have to install on your machine. You can simply use online, and this probably works well enough for small projects to learn on: https://www.onlinegdb.com/online_ruby_compiler
Configuring Ruby for Visual Studio Code was originally found on Access 2 Learn