Getting started with Hanami 2, a modern Ruby web framework for fast, modular apps. Covers installation, project structure, actions, views, routes, and params.
Tutorials
Ruby Tutorials
Step-by-step series to learn Ruby from scratch.
Hanami Basics
4 tutorials
- Getting Started with Hanami 2: Build Modern Ruby Web Apps
- Hanami Actions and Views: Handle Requests and Render Responses
Learn Hanami actions and views: handle HTTP requests, work with route and query parameters, render templates, and return JSON responses in Hanami 2.
- ROM Persistence in Hanami: Relations, Repositories, Commands
Learn how to use ROM persistence in Hanami 2 applications with practical examples for relations, repositories, entities, migrations, and transactions.
- Hanami Slices: Modular Code Organisation for Ruby Apps
Learn organising code with Hanami slices for modular apps. Create domain boundaries, share code between features, and keep your architecture clean.
Intermediate Ruby
5 tutorials
- Working with Procs and Lambdas: A Ruby Tutorial
Learn how to work with procs and lambdas in Ruby: how to create them, how arity and return differ between the two, and when to choose each in real code.
- Ruby Enumerable: map, filter, and aggregate collections
Learn how the Ruby Enumerable module helps you map, filter, search, group, and aggregate collections with practical examples.
- The Comparable Module in Ruby: Sorting and Comparison Made Simple
Learn how to use Ruby Comparable module to add sorting and comparison methods to your classes with the spaceship operator, including multi-criteria ordering.
- Working with Ruby symbols vs strings: when to use each
Learn how working with Ruby symbols vs strings affects memory and performance, and when to use each type for hash keys, method names, and user input in Ruby.
- Testing RSpec in Ruby: Practical BDD Tutorial
Hands-on tutorial for testing RSpec in Ruby. Covers describe blocks, matchers, hooks, let, mocking, and the testing workflow you can reuse in real projects.
Rails Basics
8 tutorials
- Ruby on Rails getting started: install, create, and run your first app
Rails getting started: install Rails, create your first app, understand the directory structure, and run the development server to see it all in action.
- Rails MVC Pattern: How Models, Views, and Controllers Fit Together
Explore the Rails MVC pattern: understand the request lifecycle, what models, views, and controllers do, and see code examples that connect each layer together.
- Working with ActiveRecord Basics: Models, Queries, and Relationships
Learn working with ActiveRecord basics in Rails through hands-on examples. Covers models, CRUD operations, validations, associations, scopes, callbacks,.
- Rails Migrations: Versioning Database Changes in Ruby
A practical guide to Rails migrations: version your database schema with Ruby, create tables, add columns, manage foreign keys, and roll back changes safely.
- Rails Views and Partials: ERB, Layouts, and Fragments
Learn Rails views and partials: how ERB templates render HTML, layouts wrap pages, and partials keep view code reusable with practical examples for beginners.
- Rails associations: belongs_to, has_many, and through relationships
Learn Rails associations: belongs_to, has_one, has_many, through, and polymorphic. Connect models and manage dependent records with practical code examples.
- Rails forms and validations: building safe user input flows
Learn how to build Rails forms, protect them with strong parameters, and use validations to keep user input clean and predictable.
- Rails Routing: RESTful, Custom, and Named Routes
Learn how Rails routing maps HTTP requests to controllers and actions. Covers RESTful routes, custom routes, route constraints, and named routes in Rails.
Rails Intermediate
5 tutorials
- Rails Middleware: Request and Response Stack
Understanding Rails middleware helps you inspect the request stack, build custom middleware, and decide when to use it for request and response processing.
- ActiveJob and Sidekiq: background jobs in Rails
Learn ActiveJob and Sidekiq in Rails: create background jobs, configure queues, monitor workers, handle retries, and keep web requests fast with Redis.
- ActionCable WebSockets in Rails
Learn ActionCable WebSockets in Rails, from setup and channels to broadcasting, authorization, testing, and production tips.
- Building APIs with Rails API Mode
Learn how building APIs with Rails API Mode creates lightweight, focused JSON backends. Covers API-only apps, serializers, authentication, error handling,.
- Rails Concerns and Service Objects
Learn how to use Rails Concerns for modularizing models and Service Objects for organizing business logic in Rails applications.
Ruby Concurrency
6 tutorials
- Ruby Threads Basics: Thread.new, Mutex, and Queue
Learn Ruby's threading model: creating threads, synchronization with Mutex and Queue, avoiding deadlocks, and understanding the GVL in Ruby threads.
- Ruby Mutexes and Thread Synchronization: A Practical Guide
Ruby mutexes synchronization guide: use Mutex, Queue, and ConditionVariable to prevent race conditions and coordinate threads safely across Ruby threads.
- Ruby Fiber Basics: Yield and Resume Control Flow
Master Ruby fiber basics with practical examples of yield and resume. Build producer-consumer patterns and learn cooperative concurrency for control flow.
- Ruby Ractors: Introduction to Parallel Actors
Learn Ruby Ractors, the true parallelism model in Ruby 3.0. Master message passing with send, take, yield, and receive for memory-isolated concurrency.
- Ruby Async Gem: Fiber-Based Concurrency for I/O
Learn Ruby async gem concurrency: handle thousands of I/O operations in one thread with the reactor-based event loop and fiber scheduler.
- The concurrent-ruby Library: Futures, Actors, and Queues
Learn the concurrent-ruby library for thread-safe collections, async futures, actors, and synchronization primitives in production Ruby apps.
Ruby for Devops
4 tutorials
- Ruby Scripting Basics for Automation
Learn Ruby scripting basics for automation, including files, system commands, command-line arguments, JSON, YAML, and OptionParser.
- Working with files and directories in Ruby
Learn how working with files and directories in Ruby helps DevOps automation. Covers reading, writing, FileUtils, Dir, and Pathname with practical examples.
- Ruby Thor CLI: Building Professional Command-Line Tools
Learn how to build Ruby CLI tools with Thor. This guide covers commands, options, subcommands, prompts, and best practices for real automation tools.
- Ruby Rake Tasks: Automating Development Workflows
Learn how to use Ruby Rake tasks to automate development workflows. This guide covers task definition, dependencies, namespaces, and practical patterns.
Ruby Fundamentals
16 tutorials
- Installing Ruby: macOS, Linux, and Windows
A step-by-step guide to installing Ruby on macOS, Linux, and Windows. Covers Homebrew, rbenv, RVM, RubyInstaller, and WSL so you can set up a working.
- Getting Started with Ruby: Your First Programs
Getting started with Ruby: write your first program, learn basic syntax, variables, methods, and conditionals in this beginner-friendly tutorial.
- Ruby Basics: Variables, Types, and Operators
Master Ruby basics: variables, data types, and operators. Learn to store, access, and transform data in Ruby programs with practical code examples.
- Working with Ruby control flow: if, unless, and loops
Learn how working with Ruby control flow like if, unless, case, while, and iterators helps you write programs that make decisions and repeat tasks cleanly.
- Defining and Calling Methods in Ruby
Learn defining and calling methods in Ruby with examples. Covers parameters, default values, keyword arguments, naming conventions, and best practices.
- Working with Ruby strings: a complete tutorial
A complete tutorial on Ruby strings: learn creation, interpolation, searching, splitting, encoding, and the most common string methods with practical examples.
- Working with Ruby Arrays: Creation, Iteration, and Methods
Working with Ruby arrays: creation, indexing, slicing, mutation, iteration with each and map, set operations, common Enumerable patterns, and pitfalls to avoid.
- Working with Ruby Hashes: Keys, Values, and Iteration Guide
Learn working with Ruby hashes: key-value data with symbol keys, fetch, merge, slice, iteration patterns, and real-world use cases like counting and grouping.
- Ruby Blocks and Iterators: Each, Map, Select, and Yield
Master Ruby blocks and iterators: each, map, select, reduce, and yield. Write expressive code for data transformation, filtering, and custom block methods.
- Ruby Classes and Objects: How to Define and Use Them
Learn Ruby classes and objects: define your own classes, create instances with initialize, work with instance variables, and use accessor methods.
- Ruby Modules and Mixins: Namespaces, Include, and Extend
Learn Ruby modules and mixins: organize code with namespaces, share behavior via include, extend, and prepend, with patterns like Serializable and Configurable.
- Ruby error handling with begin, rescue, ensure, and raise
Learn Ruby error handling with begin, rescue, ensure, and raise so your code can recover from exceptions, clean up safely, and report useful feedback.
- Working with Ruby file I/O and paths
Working with Ruby file I/O: read and write files, handle paths, use FileUtils and Tempfile, and process CSV and JSON data with practical examples.
- Ruby Methods: Defining, Calling, and Customizing Methods in Ruby
Master Ruby methods from basic definition and calling syntax to keyword arguments, method visibility, predicate and bang conventions, and best practices for.
- Ruby define_method: Create Dynamic Methods at Runtime
Use Ruby define_method to generate methods at runtime with blocks. Covers splat args, keyword args, method visibility, and real-world metaprogramming patterns.
- Ruby Variables and Types: A Complete Guide to Scopes and Type Checking
Master Ruby variables and types with practical examples. Covers local, instance, class, global, and constant variables, plus type checking, duck typing, and.
Ruby Metaprogramming
5 tutorials
- Ruby class_eval and instance_eval
Learn Ruby class_eval and instance_eval: how each method works, when to use them for metaprogramming and DSLs, and how they change method scope at runtime.
- Ruby Introspection and Reflection: Inspecting Objects at Runtime
Learn Ruby introspection and reflection to inspect objects at runtime with methods and respond_to?, and modify behavior dynamically with send and const_get.
- Ruby hooks and callbacks: included, extended, prepended, and inherited
Learn Ruby hooks and callbacks like included, extended, prepended, inherited, and method_missing, with examples for modules, classes, and metaprogramming.
- Mastering method_missing in Ruby
Mastering method_missing in Ruby, from basic syntax to dynamic dispatch, respond_to_missing?, caching, and real-world DSL examples.
- Ruby DSLs with instance_eval and method_missing
Learn how to build Ruby DSLs with instance_eval, method_missing, and fluent interfaces. Practical examples for configuration, validation, and report building.
Ruby Testing
5 tutorials
- Minitest Basics — Your First Ruby Tests
Get started with Minitest basics: learn assertions, expectations, test fixtures, and best practices for writing fast, reliable Ruby unit tests.
- Mocking and Stubbing in Ruby with Minitest: Mocks, Stubs, and Spies
Master Minitest mocking and stubbing: learn mock objects, method stubs, spies, and practical patterns for testing Ruby code without external dependencies.
- Integration Testing in Ruby: RSpec and Capybara Guide
Learn integration testing in Ruby with RSpec and Capybara: test database interactions, HTTP requests, JSON APIs, and email delivery with practical examples.
- Ruby Test Coverage with SimpleCov: Measure and Improve Your Tests
Learn how Ruby test coverage with SimpleCov helps find untested code, track line and branch coverage, integrate with CI, and write meaningful tests.
- CI Setup with GitHub Actions for Ruby
Learn how to set up CI setup for Ruby projects with GitHub Actions, including tests, linting, database checks, and practical workflow examples.
Ruby Web Without Rails
4 tutorials
- Build Your Own Web Framework with Rack in Ruby
Build your own web framework in Ruby with Rack, then learn how routing, templates, and middleware fit together in a small app.
- Rack Middleware from Scratch: Build Your Own Ruby Middleware
Build your own Rack middleware from scratch and understand how the middleware stack works in Ruby web applications.
- Building Web Apps with Roda: A Routing Tree Framework
Build web apps with Roda, a routing-tree framework for Ruby. Learn routing trees, plugins, views, and practical patterns for fast web applications.
- Getting Started with Sinatra: Build Your First Ruby Web App
Get started with Sinatra: install the lightweight Ruby web framework, create your first app with routing and ERB templates, and serve static files.