Labs ICT
โญ Pro Login

Setting Up Ruby

Installing Ruby on your machine.

1 min read | Ruby Tutorial
โญ

Want the full learning experience?

Get structured courses, certificates, projects, and instructor support with LabsICT Pro.

Explore Pro Courses

Setting Up Ruby

First, check if Ruby is already installed. Open your terminal and run ruby --version. If you see a version number, you're good. If not, time to install. On Mac, the easiest way is using rbenv through Homebrew: brew install rbenv ruby-build, then rbenv install 3.2.2 and rbenv global 3.2.2. On Windows, grab RubyInstaller from rubyinstaller.org โ€” it handles everything for you. After installing, verify with ruby --version again. Use irb to jump into an interactive Ruby session for quick testing. The gem command lets you install packages from RubyGems.

# Check if Ruby is installed
ruby --version
# => ruby 3.2.2 (2023-03-30 revision e510147985) [x64-mingw-ucrt]

# Start interactive Ruby (irb)
irb
# Now you can type Ruby code and see results immediately

# Install a gem (package)
gem install rails
gem install bundler

# List installed gems
gem list

๐Ÿงช Quick Quiz

What command checks Ruby version?