Guides
In-depth tutorials and guides for Ruby developers.
WebSockets in Ruby
Build real-time features in Ruby with three WebSocket approaches: websocket-ruby for pure Ruby, ActionCable for Rails, and async-websocket.
The Command Pattern in Ruby
Implement the command pattern in Ruby — encapsulate requests as objects, enable undo/redo, queue operations, and build extensible CLI apps.
The Builder Pattern in Ruby
Learn how to implement the builder pattern in Ruby for cleaner, step-by-step object construction with fluent interfaces and nested structures.
Ruby Array Methods: The Practical Guide
Learn the 7 Ruby array methods you'll use every day—map, select, reduce, find, sort_by, uniq, and flatten—with practical patterns and real examples.
ActiveSupport Outside of Rails
A practical guide to using ActiveSupport core extensions, time utilities, and number helpers in plain Ruby scripts and gems
Configuration Patterns in Ruby
Learn how to design and manage configuration for Ruby applications using patterns like module-level config, Config objects, ENV variables, and YAML files
Date and Time in Ruby
A practical guide to working with dates, times, and timestamps in Ruby using the standard library
The Decorator Pattern in Ruby
Learn how to extend Ruby objects at runtime using the decorator pattern, SimpleDelegator, Forwardable, and ActiveSupport::Notification.
Dependency Injection in Ruby
Learn how dependency injection improves testability and flexibility in Ruby applications through constructor, setter, and method injection patterns.
Hash Tricks in Ruby
Essential Hash tricks in Ruby — transform_keys, dig, fetch, slice, auto-vivification, and more.
HTTP Clients in Ruby
A practical guide to making HTTP requests in Ruby using Net::HTTP, Faraday, and HTTParty. Compare approaches, handle errors, and choose the right tool.
JSON and XML in Ruby
Learn how to parse, generate, and manipulate JSON and XML data in Ruby with practical examples and performance tips
Logging in Ruby
Learn how to log messages in Ruby using the built-in Logger class, including log levels, formatting, file rotation, and best practices.
The Null Object Pattern in Ruby
The Null Object pattern eliminates nil checks by providing objects that respond to the same interface as real ones, with practical Ruby and Rails examples.
The Observer Pattern in Ruby
Learn how to implement the observer pattern in Ruby using the built-in Observable module, custom implementations, and ActiveSupport::Notifications.
Service Objects in Ruby
Learn how service objects help you extract complex business logic from your Rails controllers and models into focused, testable Ruby objects.
State Machines in Ruby
Model object lifecycles with state machines in Ruby using the AASM gem. Covers states, events, transitions, guards, callbacks, and ActiveRecord integration.
The Strategy Pattern in Ruby
Implement the strategy pattern in Ruby to isolate algorithms, swap behaviors at runtime, and replace complex conditionals with interchangeable objects.
String Manipulation in Ruby
A practical guide to manipulating strings in Ruby — covering creation, indexing, slicing, substitution, case conversion, splitting, joining, and encoding.
Value Objects in Ruby
Learn how to model immutable, equality-by-value domain concepts in Ruby using Struct, Data, and plain objects.
Comparable and Enumerable in Ruby
Learn how to add comparison operators to your objects with Comparable and supercharge collections with Enumerable in Ruby.
IO and Files in Ruby
Read, write, and manage files in Ruby using File, IO, StringIO, and Dir classes with practical examples and common pitfalls.
Symbols Deep Dive in Ruby
Learn how Ruby symbols work under the hood, their performance benefits as hash keys, and when to use them over strings.
Benchmarking Ruby Code
Learn how to measure and compare the performance of your Ruby code using the standard library Benchmark module and the benchmark-ips gem.
ERB Templates Outside of Rails
Learn how to use Ruby's ERB templating system without Rails for mailers, static site generators, code generation, and more.
Building CLIs with OptionParser
Parse command-line arguments in Ruby with OptionParser. Covers flags, type coercion, custom coercion, and help generation.
DRb — Distributed Ruby
Learn how to build distributed Ruby applications that communicate across processes and networks using DRb's built-in object system.
YAML.safe_load and Safe Serialization
Learn how to safely deserialize YAML in Ruby without exposing your application to remote code execution attacks.
Lazy Enumerators for Large Datasets
Learn how Ruby's Enumerator::Lazy helps you process large datasets efficiently without loading everything into memory.
method_missing and respond_to_missing?
Learn how Ruby's method_missing and respond_to_missing? work together to create flexible, dynamic interfaces.
Socket Programming in Ruby
Learn how to build network clients and servers using Ruby's socket classes. Covers TCPServer, TCPSocket, UDPSocket, and practical examples.
Tempfile and Tmpdir for Temporary Storage
Learn how to create and manage temporary files and directories in Ruby using Tempfile, Dir.tmpdir, and Dir.mktmpdir.
Rails Caching Strategies
Learn how to speed up your Rails applications with low-level caching, fragment caching, Russian doll caching, and cache expiration strategies.
Pattern Matching in Ruby
Learn how to use Ruby 3's pattern matching syntax for data validation, API response parsing, and control flow
Fiber Scheduler and Async IO
Learn how to use Ruby's Fiber Scheduler for async IO operations, implement non-blocking code, and handle thousands of concurrent connections efficiently.
Struct — Lightweight Data Objects in Ruby
Learn how to use Ruby's Struct class to create lightweight, focused data structures without the overhead of full classes
The Data Class in Ruby 3.2+
Define immutable value objects with Ruby's Data class — frozen by default, keyword-only arguments, and first-class pattern matching support.
Debugging Ruby with the debug Gem
Learn how to use Ruby's official debug gem to step through code, inspect variables, and fix bugs quickly using both CLI and source-based debugging.
Digest — Hashing with MD5, SHA256 and More
Learn how to compute cryptographic hashes in Ruby with the Digest module — covering SHA256, MD5, SHA1, file hashing, and security considerations.
Frozen String Literals and Immutability
Learn how Ruby handles string immutability with frozen_string_literal, its performance benefits, and how to work with mutable strings when needed.
Ruby GC Tuning and Memory Profiling
Learn how to tune Ruby's garbage collector and profile memory usage in your applications. Covers GC.stat, environment variables, and profiling tools.
Ractor-Based Concurrency
Learn how Ractors communicate via message passing, build pipelines and worker pools, and avoid the shared-state pitfalls of threads.
Refinements — Scoped Monkey Patching
Ruby's refinements let you modify core classes without affecting the rest of your codebase. Learn the syntax, scope rules, and gotchas.
How to Work with Arrays in Ruby
A comprehensive guide to creating, manipulating, and iterating over arrays in Ruby with practical examples
How to Work with Hashes in Ruby
Practical Ruby hash operations: creation, access, iteration, transformation
How to Work with Strings in Ruby
Essential string manipulation techniques for Ruby developers with practical examples
Blocks, Procs, and Lambdas Explained
A complete guide to understanding blocks, procs, and lambdas in Ruby — the closure primitives that make Ruby powerful.
Sidekiq: Background Jobs in Ruby
A comprehensive guide to background jobs with Sidekiq in Ruby. Learn to offload tasks, manage queues, and scale your applications.
Concurrency with Threads
Learn how to use Ruby's Thread class for concurrent programming, handle thread-local data, and avoid race conditions and deadlocks.
Managing Gems with Bundler
A comprehensive guide to using Bundler for managing Ruby gem dependencies in your projects. Learn about Gemfile, Gemfile.lock, and best practices.
Metaprogramming Basics in Ruby
A comprehensive guide to Ruby's metaprogramming capabilities, covering dynamic methods, define_method, and runtime code execution.
Making HTTP Requests in Ruby
Learn how to make HTTP requests in Ruby using Net::HTTP. Covers GET, POST, headers, response handling, and error handling for DevOps scripts.
Open Classes and Monkey Patching in Ruby
Learn how Ruby's open classes work, the risks of monkey patching, and best practices for safely modifying existing classes.
Regular Expressions in Ruby
A complete guide to regular expressions in Ruby covering pattern matching, common regex features, and practical examples for string manipulation.