Learn Ruby
Structured lessons from the basics up — follow the path below in order, at your own pace.
-
1
Level 1 — Beginner Beginner 38 lessons
Start here if you have never written a line of Ruby before. No programming experience is required — work through these lessons in order, sin...
Lessons in this module
What Is Ruby? Why Learn Ruby? What Can You Build With Ruby? Installing Ruby Setting Up Your Development Environment Your First Ruby Program How Ruby Code Runs Ruby Syntax Basics Printing Output: puts, print, and p Variables Data Types Numbers Strings String Methods Symbols Booleans and nil Operators Getting User Input Type Conversion Conditionals: if, elsif, else unless and Modifier Conditions case Expressions Loops: while and until Iterators: times, each, and upto Ranges break and next Arrays Array Methods Hashes Methods Method Arguments Return Values Variable Scope Blocks map, select, and reduce Basic Error Handling Comments and Code Style Requiring Files and Libraries -
2
Beginner Projects Beginner 1 lesson
Build these with nothing but what Level 1 covered — puts , gets , strings, numbers, conditionals, loops, arrays, hashes, methods, and blocks...
-
3
Level 2 — Intermediate Intermediate 26 lessons
These lessons cover classes and objects, modules and mixins, exceptions, files, gems and Bundler, JSON and HTTP, testing, and the everyday t...
Lessons in this module
Classes and Objects Accessors: attr_reader, attr_writer, attr_accessor Instance Methods, self, and to_s Class Methods and Class-Level Data Inheritance and super Encapsulation: public, private, and protected Polymorphism and Duck Typing Modules: Namespaces and Mixins Comparable and Enumerable Struct and Data Exceptions in Depth Procs and Lambdas Pattern Matching Working with Files Frozen Objects and Mutability Gems and Bundler Working with JSON and YAML HTTP Requests and APIs Environment Variables and Configuration Logging Testing with Minitest Testing with RSpec Debugging Ruby Regular Expressions Dates and Times Code Organization and RuboCop -
4
Intermediate Projects Intermediate 1 lesson
Build these using classes, modules, exceptions, files, gems, JSON, HTTP, and tests from Level 2. Give each project its own folder with a Gem...
-
5
Level 3 — Advanced Advanced 18 lessons
These lessons cover metaprogramming, concurrency, performance and memory, databases, security, web apps with Rack, and how a real Ruby proje...
Lessons in this module
Metaprogramming: send and define_method method_missing and respond_to_missing? Blocks as DSLs: instance_eval and configure Open Classes, Monkey Patching, and Refinements Enumerators and Lazy Evaluation Threads and the GVL Thread Safety: Mutex and Queue Ractors and Fibers Memory and Garbage Collection Performance and Profiling Working with Databases Security Fundamentals Building Web Apps with Rack Test Doubles: Stubs and Mocks Type Signatures: RBS and Sorbet Designing and Publishing a Gem Design Patterns in Ruby Production Ruby: Deployment and CI/CD -
6
Advanced Projects Advanced 1 lesson
Build these using metaprogramming, concurrency, databases, Rack, and the testing, security, and deployment practices from Level 3. 1. JSON R...
-
7
What You Should Know Now — and What's Next 1 lesson
What You Should Know Now Core syntax: variables, strings, numbers, symbols, nil , conditionals, loops, and ranges Arrays, hashes, and the En...