Installing Ruby on macOS, Linux, or Windows with Homebrew, rbenv, RVM, RubyInstaller, or WSL, followed by setup verification.
Tutorial series
Ruby Fundamentals
16 tutorials — follow in order for the best learning path.
- Installing Ruby: macOS, Linux, and Windows
- 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.