Ruby
A dynamic, open source programming language with a focus on simplicity and productivity, designed to make programming enjoyable.
Created by Yukihiro "Matz" Matsumoto
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:
| |
Blocks and Iterators
Ruby’s blocks provide elegant iteration and callback patterns:
| |
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
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
Influenced
Running Today
Run examples using the official Docker image:
docker pull ruby:3.3-alpineExample usage:
docker run --rm -v $(pwd):/app -w /app ruby:3.3-alpine ruby hello.rb