Installing Ruby
In this page:
Installing Ruby
Ruby needs to be installed before you can run any Ruby script, and it's available on Linux, macOS, and Windows through various installers. Most developers use a version manager like rbenv or rvm to switch between Ruby versions per project, rather than a single system-wide install. Package managers like apt, brew, and choco also provide direct installs.
Note: Run ruby -v after installing to confirm the interpreter is on your PATH.
Example: Installing Ruby
# Linux (Ubuntu/Debian)
sudo apt-get update && sudo apt-get install -y ruby-full
# macOS (Homebrew)
brew install ruby
# Windows (Chocolatey)
choco install ruby
# Verify installation (all platforms)
ruby -v
⚠️ Run this command in your terminal.
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: