How you can check, if you have Ruby installed

The most current version as of .

Here is, how you can check, if you have the Ruby programming language installed on your machine.

ruby -v

If you have Ruby installed, this command will print your current Ruby version (-v) to the terminal.

ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x64-mingw-ucrt]

In case the execution of this command throws some kind of error message to your screen, you propably do not have Ruby installed.

ruby : The term 'ruby' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.

If you would like to install Ruby on Windows and you have installed the chocolatey package manager you can run:

choco install ruby

This will install Ruby on your computer, you can check if Ruby is avaliable as mentioned early by adding the -v flag to the ruby command.

If you just installed Ruby and it is not available immediately, start a new shell window and try the versionn command once again (the updated PATH is only loaded once, when you open a new window and won’t be updated in active sessions).

— David Wolf