Est. 1995 Beginner

Ruby

A dynamic, open source programming language with a focus on simplicity and productivity, designed to make programming enjoyable.

Created by Yukihiro "Matz" Matsumoto

Paradigm Multi-paradigm: Object-Oriented, Functional, Imperative, Reflective
Typing Dynamic, Strong
First Appeared 1995
Latest Version Ruby 3.3 (2024)

Ruby is a dynamic, reflective, object-oriented programming language designed with an emphasis on programmer happiness and productivity. Created by Yukihiro “Matz” Matsumoto in Japan, Ruby combines elements from his favorite languages to create something that is powerful yet enjoyable to use.

History & Origins

In 1993, Yukihiro Matsumoto (known as “Matz”) began developing Ruby in Japan. He was dissatisfied with the scripting languages available at the time and wanted to create a language that was more powerful than Perl and more object-oriented than Python.

Matz has often stated his guiding principle:

“Ruby is designed to make programmers happy.”

This philosophy permeates every aspect of the language, from its elegant syntax to its principle of least surprise—the idea that the language should behave in ways that minimize confusion for experienced programmers.

The Name

The name “Ruby” was chosen as a playful reference to Perl (pearl being another gemstone). It was selected from among several candidates during a chat session between Matz and a colleague in 1993.

The Rails Revolution

While Ruby had a dedicated following in Japan from its inception, it was the release of Ruby on Rails in 2004 that catapulted the language to international fame. Created by David Heinemeier Hansson at 37signals (now Basecamp), Rails demonstrated that web development could be both productive and elegant.

Rails introduced concepts that are now standard across web frameworks:

  • Convention over Configuration - Sensible defaults reduce boilerplate
  • Don’t Repeat Yourself (DRY) - Code reuse is a first-class concern
  • MVC Architecture - Clean separation of concerns
  • Active Record - Intuitive database abstraction

The “15-minute blog” demo became legendary, showing how quickly productive applications could be built.

Ruby’s Design Philosophy

Ruby follows several key principles:

Everything is an Object

In Ruby, everything is an object—even numbers and booleans. This consistency makes the language intuitive:

1
2
3
5.times { puts "Hello" }
"hello".upcase
[1, 2, 3].reverse

Blocks and Iterators

Ruby’s blocks provide elegant iteration and callback patterns:

1
2
3
[1, 2, 3].each do |number|
  puts number * 2
end

Principle of Least Surprise

Ruby aims to behave as programmers expect. Methods are named intuitively, and the language avoids unexpected behaviors.

Modern Ruby

Ruby continues to evolve with significant improvements:

  • Ruby 3.0+ Performance - YJIT JIT compiler brings substantial speed improvements
  • Concurrency - Ractor provides actor-based parallel execution
  • Type Checking - RBS and TypeProf enable optional static type checking
  • Pattern Matching - Modern pattern matching syntax added in Ruby 2.7+

While Rails remains popular, Ruby’s ecosystem has expanded to include:

  • Sinatra - Lightweight web framework
  • Hanami - Modern, modular web framework
  • Dry-rb - Collection of next-generation Ruby libraries
  • Crystal - A compiled language inspired by Ruby’s syntax

Ruby remains a beloved language for developers who value expressiveness, elegance, and productivity over raw performance.

Timeline

1993
Yukihiro Matsumoto begins developing Ruby in Japan
1995
Ruby 0.95 publicly released in Japan
1996
Ruby 1.0 released
2000
First English-language Ruby book published; international adoption begins
2004
Ruby on Rails framework released, sparking massive Ruby adoption
2006
Ruby reaches mainstream popularity; named TIOBE Language of the Year
2007
Ruby 1.9 begins development with YARV virtual machine
2013
Ruby 2.0 released with refinements and keyword arguments
2020
Ruby 3.0 released with goal of being 3x faster than Ruby 2
2023
Ruby 3.3 released with YJIT improvements and parser enhancements

Notable Uses & Legacy

Ruby on Rails

The web framework that popularized Ruby, powering Shopify, GitHub, Basecamp, Airbnb, and countless startups.

GitHub

The world's largest code hosting platform was originally built with Ruby on Rails.

Shopify

The e-commerce giant is one of the largest Ruby on Rails applications in the world.

Homebrew

The popular macOS package manager is written in Ruby.

Chef & Puppet

Major infrastructure automation and configuration management tools are built with Ruby.

Discourse

Popular open-source forum software powering communities worldwide.

Language Influence

Influenced By

Perl Smalltalk Eiffel Ada Lisp Python

Influenced

Crystal Elixir Groovy Swift CoffeeScript

Running Today

Run examples using the official Docker image:

docker pull ruby:3.3-alpine

Example usage:

docker run --rm -v $(pwd):/app -w /app ruby:3.3-alpine ruby hello.rb

Topics Covered

Last updated: