Learn Ruby
A free, interactive online Ruby course. You write Ruby on every lesson, with AI hints when something raises, and a free certificate of completion when you finish.
3,933+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction to Ruby
3 lessons317- 01What is Ruby?Challenge
- 02Hello WorldChallengeQuiz
- 03Comments in RubyChallengeQuiz
Variables and Data Types
7 lessons750- 01Numbers and VariablesChallengeQuiz
- 02String Data TypeChallengeQuiz
- 03Boolean Data TypeChallengeQuiz
- 04Symbol Data TypeChallengeQuiz
- 05Checking Data TypesChallengeQuiz
- 06Naming ConventionsChallengeQuiz
- 07Recap - Variable CreationChallenge
Operators Part 1
5 lessons534- 01Arithmetic OperatorsChallengeQuiz
- 02Modulo OperatorChallengeQuiz
- 03Arithmetic ShortcutsChallengeQuiz
- 04Recap - Simple MathChallenge
- 05Comparison OperatorsChallengeQuiz
Operators Part 2
5 lessons534- 01Logical Operators Part 1ChallengeQuiz
- 02Logical Operators Part 2ChallengeQuiz
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuiz
- 05Logical Operators Part 4ChallengeQuiz
Decision Making
5 lessons533- 01If StatementChallengeQuiz
- 02If - ElseChallengeQuiz
- 03Recap - Simple CalculatorChallenge
- 04Nested If - ElseChallengeQuiz
- 05Unless StatementChallengeQuiz
Basic IO
8 lessons850- 01Output with putsChallengeQuiz
- 02Output with print and pChallengeQuiz
- 03Output With VariablesChallengeQuiz
- 04Input with getsChallengeQuiz
- 05Chomp MethodChallengeQuiz
- 06Type ConversionChallengeQuiz
- 07Recap - Age CalculatorChallenge
- 08Recap - True or FalseChallenge
Bill Split Calculator
Project5 lessons1- 01Welcome MessageChallenge
- 02Getting User InputProject
- 03Calculating Tip And TotalProject
- 04Splitting The BillProject
- 05Formatted OutputProject
Loops
9 lessons960- 01For Loop with RangesChallengeQuiz
- 02While LoopChallengeQuiz
- 03BreakChallengeQuiz
- 04NextChallengeQuiz
- 05Recap - FactorialChallenge
- 06Times LoopChallengeQuiz
- 07Until LoopChallengeQuiz
- 08Nested LoopsChallengeQuiz
- 09Recap - Dynamic InputChallenge
Methods
6 lessons634- 01Defining a MethodChallengeQuiz
- 02Method ParametersChallengeQuiz
- 03Return ValuesChallengeQuiz
- 04Recap - Sigma MethodChallenge
- 05Recap - Validation MethodChallenge
- 06Default Parameter ValuesChallengeQuiz
FizzBuzz with a Twist
Project4 lessons1- 01Game OverviewChallenge
- 02The FizzBuzz MethodProject
- 03Looping Through NumbersProject
- 04Adding The TwistProject
Arrays
7 lessons744- 01Creating ArraysChallengeQuiz
- 02Accessing Array ElementsChallengeQuiz
- 03Modifying ArraysChallengeQuiz
- 04Array MethodsChallengeQuiz
- 05Recap - Product ArrayChallenge
- 06Recap - Reversed ArrayChallenge
- 07Array ShortcutsChallengeQuiz
Iterating Over Collections
4 lessons434- 01Each IteratorChallengeQuiz
- 02Each with IndexChallengeQuiz
- 03Iterating Over StringsChallengeQuiz
- 04Map and CollectChallengeQuiz
Arrays Advanced
4 lessons435- 01Array Slicing with RangesChallengeQuiz
- 02Array Slicing with IndexesChallengeQuiz
- 03Array OperatorsChallengeQuiz
- 04Include? MethodChallengeQuiz
Hashes
6 lessons644- 01Creating HashesChallengeQuiz
- 02Accessing Hash ElementsChallengeQuiz
- 03Modifying HashesChallengeQuiz
- 04Hash MethodsChallengeQuiz
- 05Recap - Product HashChallenge
- 06Symbols as Hash KeysChallengeQuiz
Daily Expense Tracker
Project7 lessons1- 01Project OverviewChallenge
- 02Exit The ProgramProject
- 03Add ExpenseProject
- 04View All ExpensesProject
- 05Total And AverageProject
- 06Clear AllProject
- 07Error HandlingProject
Final Challenges
3 lessons3- 01Flat Asterisk PyramidChallenge
- 02Pattern FinderChallenge
- 03What To BuyChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseDevelop problem-solving skills in Ruby with strings, blocks, enumerable methods, nested data, and error handling.Strings In Depth
5 lessons534- 01String Methods OverviewChallengeQuiz
- 02String InterpolationChallengeQuiz
- 03Iterating Over StringsChallengeQuiz
- 04Split and JoinChallengeQuiz
- 05Recap - String WeaverChallenge
Ranges
4 lessons425- 01What is a Range?ChallengeQuiz
- 02Range MethodsChallengeQuiz
- 03Ranges in Case / WhenChallengeQuiz
- 04Recap - Range PracticeChallenge
2D Arrays
5 lessons534- 012D Array BasicsChallengeQuiz
- 02Accessing 2D ElementsChallengeQuiz
- 03Iterating Over 2D ArraysChallengeQuiz
- 04Common 2D PatternsChallengeQuiz
- 05Recap - Matrix OperationsChallenge
Blocks, Procs & Lambdas
6 lessons641- 01What is a Block?ChallengeQuiz
- 02do..end vs BracesChallengeQuiz
- 03The yield KeywordChallengeQuiz
- 04Block ParametersChallengeQuiz
- 05Procs and LambdasChallengeQuiz
- 06Recap - Custom IteratorChallenge
Enumerable Powerhouse
7 lessons752- 01Select and RejectChallengeQuiz
- 02Chaining MapChallengeQuiz
- 03Reduce / InjectChallengeQuiz
- 04count, all?, any?, none?ChallengeQuiz
- 05group_by and partitionChallengeQuiz
- 06sort_by, min_by, max_byChallengeQuiz
- 07Recap - Data PipelineChallenge
Project - Library Manager
Project5 lessons139- 01Project OverviewChallengeQuiz
- 02Add BookProjectQuiz
- 03Search By TitleProjectQuiz
- 04Filter By GenreProjectQuiz
- 05Mark As ReadProjectQuiz
Hashes Part 2
5 lessons535- 01Hash.new with DefaultsChallengeQuiz
- 02Iterating HashesChallengeQuiz
- 03Nested HashesChallengeQuiz
- 04Merging and TransformingChallengeQuiz
- 05Recap - Frequency CounterChallenge
Advanced Decision Making
5 lessons535- 01Case with Classes & RegexChallengeQuiz
- 02Multi-value whenChallengeQuiz
- 03Ternary OperatorChallengeQuiz
- 04Inline if / unlessChallengeQuiz
- 05Recap - Grade ClassifierChallenge
Error Handling
5 lessons534- 01What is an Exception?ChallengeQuiz
- 02begin / rescueChallengeQuiz
- 03Multiple rescue ClausesChallengeQuiz
- 04ensure and raiseChallengeQuiz
- 05Recap - Safe CalculatorChallenge
Project - Student Records
Project6 lessons146- 01Project OverviewChallengeQuiz
- 02Add StudentProjectQuiz
- 03Add GradeProjectQuiz
- 04Average GradeProjectQuiz
- 05List By CourseProjectQuiz
- 06Top StudentsProjectQuiz
Final Challenges
3 lessons322- 01Word AnalyticsChallengeQuiz
- 02Inventory SnapshotChallengeQuiz
- 03Data TransformerChallengeQuiz
Ruby courses
Hands-on Ruby courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Heaps & Priority Queues - Data Structures Series #7
NewIn this course, you will learn about the Heap data structure (the backbone of priority queues), create a MinHeap from zero using your preferred language, and practice coding challenges with it!
Certificate on completion
- 14
- 6
- 1
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Star Pattern Bootcamp
Put your programming problem solving skills to learn how to print star patterns range from simple to complex, involving different levels of nested loops, conditional statements, and mathematical calculations.
- 30
- 28
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Why learn Ruby with Coddy
- Run real Ruby code in your browser. No Ruby install, no rbenv or RVM to configure. Each lesson runs your Ruby script server-side and shows the output instantly.
- Idiomatic Ruby: variables, control flow, methods, blocks and procs, classes, modules, mixins, exception handling, the standard library. The Ruby foundations every Rails developer needs.
- AI hints help you read and fix Ruby errors without spoiling the answer, so the language's looser, more expressive style feels natural instead of confusing.
- Free Ruby programming certificate when you finish the course. A credible signal for Ruby on Rails, backend, and full-stack roles where Ruby fluency is the baseline expectation.