rubyguides

Tutorial series

Ruby Fundamentals

16 tutorials — follow in order for the best learning path.

  1. Installing Ruby: macOS, Linux, and Windows

    Installing Ruby on macOS, Linux, or Windows with Homebrew, rbenv, RVM, RubyInstaller, or WSL, followed by setup verification.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  15. 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.

  16. 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.