Tutorials
Step-by-step series to learn Ruby from scratch.
building-web-frameworks-in-ruby
Hanami Basics
Getting Started with Hanami 2
A step-by-step guide to building modern Ruby web applications with Hanami 2, from installation to your first working application.
Actions and Views in Hanami
Learn how to create actions and views in Hanami 2, including routing, parameters, rendering templates, and JSON responses.
Persistence with ROM in Hanami
A complete guide to using ROM (Ruby Object Mapper) for database persistence in Hanami 2 applications. Learn how to set up relations, repositories, and commands.
Organising Code with Slices
Learn how to use Hanami Slices to organize code in larger applications. Slices provide modular boundaries for grouping related components.
Intermediate Ruby
Procs and Lambdas in Ruby
Learn the difference between Procs and Lambdas in Ruby, how to create them, and when to use each one.
The Enumerable Module
Learn how to use Ruby's Enumerable module—powerful methods for iterating, searching, transforming, and collecting data from collections.
The Comparable Module
Learn how to use Ruby's Comparable module to add comparison methods to your classes using the spaceship operator.
Symbols vs Strings in Ruby
Understand the difference between Ruby symbols and strings, when to use each, and why symbols are preferred for hash keys and method identifiers.
Testing with RSpec
Learn to test Ruby code with RSpec: describe blocks, matchers, hooks, let, mocking, and BDD best practices.
metaprogramming
class_eval and instance_eval in Ruby
Learn the difference between class_eval and instance_eval in Ruby — and when to use each for metaprogramming.
Hooks and Callbacks in Ruby
Ruby hooks like included, inherited, and method_missing let you intercept events and inject behavior into classes, modules, and objects.
Building DSLs in Ruby
Learn how to build internal DSLs in Ruby using instance_eval, method_missing, and fluent interfaces with practical examples.
rack-basics
rails
Migrations in Rails
Learn how Rails migrations let you version-control your database schema using Ruby code. Create tables, add columns, and roll back changes safely.
Associations in Rails
Learn how to connect Rails models using belongs_to, has_one, has_many, and has_many :through associations with practical examples.
Rails Basics
Getting Started with Ruby on Rails
Learn how to install Rails, create your first application, and understand the basic directory structure of a Rails project.
The MVC Pattern in Rails
Learn how Model-View-Controller (MVC) architecture organizes Rails applications. Understand the responsibilities of each layer and how they work together.
ActiveRecord Basics
Learn how ActiveRecord ORM works in Ruby on Rails. Master models, database operations, relationships, and queries to build data-driven Rails applications.
Routing in Rails
Learn how Rails routes HTTP requests to controllers and actions. This guide covers RESTful routes, custom routes, route constraints, and named routes.
Rails Intermediate
Understanding Rails Middleware
Learn how Rails middleware works, how to create custom middleware, and leverage the middleware stack for request/response processing.
ActiveJob and Sidekiq in Rails
Learn how to use ActiveJob with Sidekiq for background processing in Rails applications. Create jobs, configure backends, and monitor with the web UI.
ActionCable and WebSockets in Rails
Learn how to use ActionCable to add real-time WebSocket features to Rails. Build live notifications, chat, and collaborative editing.
Building APIs with Rails API Mode
Learn how to build lightweight APIs using Rails API Mode. Create focused, fast APIs without the unnecessary overhead of full Rails stack.
Rails Concerns and Service Objects
Learn how to use Rails Concerns for modularizing models and Service Objects for organizing business logic in Rails applications.
roda-tutorials
ruby
Threads Basics in Ruby
Learn Ruby's threading model: creating threads, synchronization with Mutex and Queue, avoiding deadlocks, and understanding the GVL.
Mutexes and Synchronization in Ruby
Safely coordinate threads in Ruby using Mutex, Queue, and ConditionVariable to prevent race conditions and build producer-consumer pipelines.
Fiber Basics in Ruby
Learn Ruby's Fiber class for cooperative concurrency. Master pause-resume control flow with Fiber.yield, Fiber.resume, and Fiber#transfer.
Ractor Introduction in Ruby
Learn Ruby's Ractor — a true parallelism model introduced in Ruby 3.0. Understand actor-model message passing and memory isolation without mutexes.
The Async Gem in Ruby
Handle thousands of concurrent I/O operations in Ruby with fibers and the async gem's reactor-based event loop.
The concurrent-ruby Library
Learn how concurrent-ruby simplifies thread-safe collections, async futures, actors, and synchronization primitives for production Ruby apps.
Ruby for DevOps
Ruby for Scripting and Automation
Learn how to use Ruby for writing scripts that automate repetitive tasks, work with files, and interact with system commands.
Working with Files and Directories
Learn to read, write, and manage files in Ruby. Covers File, FileUtils, Dir, and Pathname with practical DevOps examples.
Building CLI Tools with Thor
Learn how to build professional CLI tools in Ruby with Thor. This guide covers commands, options, subcommands, and best practices.
Automating Tasks with Rake
Learn how to use Rake to automate development tasks. This guide covers task definition, dependencies, namespaces, and practical workflows.
Ruby Fundamentals
Installing Ruby on Your Computer
A step-by-step guide to installing Ruby on macOS, Linux, and Windows. Learn multiple methods including Homebrew, rbenv, RVM, and RubyInstaller.
Getting Started with Ruby
Write your first Ruby program and learn the fundamentals of the Ruby programming language in this beginner-friendly tutorial.
Ruby Basics: Variables, Types, and Operators
Learn how to store and manipulate data in Ruby with variables, understand Ruby's data types, and master operators for expressions.
Control Flow: if, unless, loops
Learn how to control the flow of your Ruby programs with conditionals and loops. Master if, unless, case, while, until, and iterators.
Defining and Calling Methods in Ruby
Learn how to define, call, and use methods in Ruby to organize your code into reusable blocks.
Working with Strings in Ruby
A comprehensive guide to creating, manipulating, and working with strings in Ruby. Learn string methods, interpolation, and common patterns.
Arrays in Ruby
A comprehensive guide to arrays in Ruby. Learn how to create, access, modify, and iterate over arrays with practical code examples.
Hashes in Ruby
Learn how to use hashes in Ruby to store and organize data with key-value pairs. This tutorial covers creating, accessing, modifying, and iterating over hashes.
Blocks and Iterators in Ruby
Learn how to use blocks, iterators, and yield in Ruby to write expressive, reusable code that powers everything from simple loops to complex data processing.
Classes and Objects in Ruby
Learn how to define classes, create objects, use initialize, instance variables, and accessor methods in Ruby.
Modules and Mixins
Learn how to use Ruby modules as namespaces and mixins to share behavior across classes. Includes practical examples of the include and extend keywords.
Error Handling with begin/rescue
Learn how to handle errors gracefully in Ruby using begin, rescue, ensure, and raise. Build robust programs that recover from unexpected situations.
File I/O in Ruby
Learn how to read from and write to files in Ruby. Covers File, IO, FileUtils, reading line-by-line, writing, and best practices for handling files safely.
Methods in Ruby
Learn how to define, call, and customize methods in Ruby — from basic syntax to keyword arguments, visibility, and idiomatic conventions.
define_method in Ruby
Learn how to dynamically define methods at runtime using Ruby's define_method, with practical examples and real-world patterns.
Ruby Metaprogramming
Introspection and Reflection in Ruby
Learn how Ruby's introspection and reflection APIs let you examine and modify objects at runtime using methods like methods, respond_to?, and send.
Mastering method_missing in Ruby
Learn how Ruby intercepts undefined method calls with method_missing, from basic syntax to advanced caching patterns and real-world DSL examples.
Ruby Fundamentals
ruby-rails-basics
The MVC Pattern in Rails
Learn how Rails implements the Model-View-Controller pattern, with a walkthrough of the request lifecycle, each layer's role, and real code examples.
Views and Partials in Rails
Learn how Rails views render HTML, use ERB templates, and reuse code with partials and layouts. Includes practical examples for beginners.
Forms and Validations in Rails
Learn how to build forms with form_with, protect them with strong parameters, and add validations to keep your data clean.
ruby-testing
Minitest Basics — Your First Ruby Tests
Learn testing fundamentals with Minitest: assertions, expectations, test fixtures, and best practices for Ruby unit tests.
Mocking and Stubbing with Minitest
Master mocking and stubbing in Minitest: mock objects, stubs, spies, and practical patterns for testing Ruby code without external dependencies.
Integration Testing in Ruby
Learn integration testing in Ruby: testing how components work together, from database interactions to HTTP requests, using RSpec and Capybara.
Test Coverage with SimpleCov
Learn how to measure and improve your Ruby test coverage using SimpleCov. Set up analysis, interpret reports, and write better tests.
CI Setup with GitHub Actions for Ruby
Learn how to set up continuous integration for your Ruby projects using GitHub Actions. Automate tests, linting, and deployments with practical examples.