Introduction
Why Ruby?
Ruby is a language designed for programmer happiness. Matz (Yukihiro Matsumoto) created it in 1995 with a single guiding principle: make programming enjoyable. The result is a language that reads almost like English, rewards elegance, and gets out of your way.
- Expressive -- Ruby code is concise and readable. A task that takes 10 lines in Java often takes 2 in Ruby.
- Everything is an object -- In Ruby, even integers and booleans are objects with methods.
5.times,"hello".upcase,[1,2,3].map. - Flexible -- Ruby embraces the idea that there is more than one way to do things. Blocks, procs, lambdas, open classes — the language bends to you.
- Rails -- Ruby on Rails, the web framework created by DHH, revolutionized web development. GitHub, Shopify, Basecamp, and Airbnb were all built on Rails.
- Great for beginners -- Ruby's syntax is forgiving and the error messages are helpful. It is one of the best first languages.
The Story
Yukihiro "Matz" Matsumoto began designing Ruby in 1993 and released the first version in 1995. He was inspired by Perl, Smalltalk, Eiffel, Ada, and Lisp — taking what he loved from each.
Ruby remained relatively obscure outside Japan until 2004, when David Heinemeier Hansson (DHH) released Ruby on Rails. Rails showed what Ruby was capable of: a web application framework that made building CRUD apps dramatically faster. The Rails community exploded, and Ruby exploded with it.
Today, Ruby is mature, stable, and widely used in web development, scripting, and DevOps tooling. The MRI (Matz's Ruby Interpreter) is the reference implementation, but JRuby and TruffleRuby bring Ruby to the JVM and GraalVM.
Who Uses Ruby
Ruby powers some of the world's most recognizable products:
- GitHub -- the largest code hosting platform in the world, built on Rails.
- Shopify -- e-commerce platform serving over a million merchants, running on a massive Rails monolith.
- Basecamp -- the original Rails app, still running on Ruby.
- Airbnb -- started on Rails and still uses Ruby extensively.
- Stripe -- uses Ruby for parts of its payment infrastructure.
What You Will Learn
This course contains 15 lessons organized into 5 chapters:
- Basics --
puts, variables, strings with interpolation, and string methods. - Numbers -- Integer and Float arithmetic, comparison operators, and boolean logic.
- Collections -- Arrays, Hashes, and Ranges — Ruby's three core collection types.
- Control Flow -- Conditionals with
if/unless, loops withwhile/until, and iterators:each,map,select,reduce. - Methods & OOP -- Defining methods with default parameters, blocks and
yield, classes with instance variables, and modules as mixins.
Each lesson explains a concept, shows examples, and gives you an exercise to write and run in your browser.
Let's get started.