Free Course Image Ruby Tutorial

Free online courseRuby Tutorial

Duration of the online course: 4 hours and 14 minutes

New

Learn Ruby fast and build real programs in a free online course with hands-on exercises—ideal for beginners starting a coding career.

In this free course, learn about

  • How to install Ruby on Windows and macOS, and verify install via ruby -v
  • Ruby basics: creating .rb files, running code, and writing Hello World
  • Console output with print vs puts; using comments with #
  • Variables and core data types (String, Integer, Float, Boolean)
  • String operations like trimming whitespace (strip) and other common methods
  • Math basics including integer division vs float division behavior
  • Getting user input with gets, handling newlines (chomp), and type conversion (to_i/to_f)
  • Building small CLI apps: calculator and Mad Libs using input, strings, and math
  • Collections: arrays vs hashes, and when key/value lookup beats index-based storage
  • Defining methods, parameters, return behavior, and using object methods
  • Control flow: if/elsif/else, comparison operators, and case expressions
  • Loops: while and for loops; implementing exponentiation via repeated multiplication
  • File I/O: reading/writing files and proper closing (file.close); basic error handling
  • OOP in Ruby: classes, initialize, inheritance, modules, and interactive use with irb

Course Description

Build a strong foundation in Ruby and start turning ideas into working programs with a beginner-friendly learning path designed for practical progress. This free online course guides you from your first setup to writing code you can run confidently, even if you are brand new to programming. By focusing on how Ruby works in real situations, you will gain the skills to read, write, and improve scripts that solve everyday problems.

You will begin by getting Ruby installed on your computer and making sure everything is running correctly, then move straight into writing your first program. As you practice, you will learn how Ruby handles output and how to control what your program shows on the screen. From there, you will work with variables and core data types, learn to manipulate strings cleanly, and use math operations in ways that match how Ruby evaluates expressions. Along the way, short exercises reinforce key concepts so they actually stick.

To help you think like a developer, the course emphasizes interaction and logic: reading user input, converting that input into the right numeric types, and using conditionals to make decisions in code. You will see how to write reusable methods, understand return values, and choose cleaner structures such as case expressions when multiple conditions appear. As your confidence grows, loops will help you automate repetitive tasks and build small interactive experiences that sharpen your problem-solving mindset.

You will also learn essential data structures such as arrays and hashes so you can organize information efficiently, plus file reading and writing so your programs can work with real data. Error handling techniques will help your scripts behave more reliably, and you will get an introduction to object-oriented Ruby with classes, initialize patterns, object methods, inheritance, and modules. By the end, you will be comfortable experimenting in irb, navigating Ruby syntax, and continuing into more advanced projects with a solid base for backend development, scripting, automation, or further study.

Course content

  • Video class: Introduction | Ruby | Tutorial 1 01m
  • Exercise: Which of the following topics is not covered in the introductory Ruby course described in the text?
  • Video class: Windows Installation | Ruby | Tutorial 2 03m
  • Exercise: What is the correct first step to install Ruby on a Windows computer using the method described?
  • Video class: Mac Installation | Ruby | Tutorial 3 02m
  • Exercise: What command can you enter in the terminal to check the installed version of Ruby on OS X?
  • Video class: Hello World / Setup | Ruby | Tutorial 4 05m
  • Exercise: What extension should be used when creating a Ruby file?
  • Video class: Drawing a Shape | Ruby | Tutorial 5 06m
  • Exercise: What is the difference between the 'print' and 'puts' commands in Ruby?
  • Video class: Variables | Ruby | Tutorial 6 10m
  • Exercise: What is the main purpose of using variables in a Ruby program?
  • Video class: Data Types | Ruby | Tutorial 7 05m
  • Exercise: In Ruby, which of the following data types can be used to represent a true or false value?
  • Video class: Working With Strings | Ruby | Tutorial 8 11m
  • Exercise: What method can be used in Ruby to remove leading and trailing spaces from a string?
  • Video class: Math 09m
  • Exercise: In Ruby, what will be the result of the operation 15 / 4, and why?
  • Video class: Getting User Input | Ruby | Tutorial 10 08m
  • Exercise: What issue can occur when using gets method in Ruby when entering user data?
  • Video class: Building a Calculator | Ruby | Tutorial 11 07m
  • Exercise: In Ruby, what method is used to convert a string input from the user into an integer for arithmetic operations?
  • Video class: Building a Mad Libs Game | Ruby | Tutorial 12 04m
  • Exercise: What is the main purpose of getting user input in the Mad Libs game creation described?
  • Video class: Arrays | Ruby | Tutorial 13 09m
  • Exercise: What is the primary advantage of using arrays in Ruby as opposed to simple variables?
  • Video class: Hashes | Ruby | Tutorial 14 06m
  • Exercise: What is a key advantage of using hashes over arrays in Ruby programming?
  • Video class: Methods | Ruby | Tutorial 15 08m
  • Exercise: What is a method in Ruby?
  • Video class: Return Statement | Ruby | Tutorial 16 05m
  • Exercise: In Ruby, what happens when a return keyword is used inside a method?
  • Video class: If Statements | Ruby | Tutorial 17 12m
  • Exercise: In Ruby, what is the purpose of using an 'if statement'?
  • Video class: If Statements (con't) | Ruby | Tutorial 18 07m
  • Exercise: What is the purpose of using comparison operators in an if statement in Ruby?
  • Video class: Building a Better Calculator | Ruby | Tutorial 19 08m
  • Exercise: In a Ruby program to create a calculator that can add, subtract, multiply, and divide, what Ruby method is used to convert user input from the command line into a number with decimal precision?
  • Video class: Case Expressions | Ruby | Tutorial 20 09m
  • Exercise: What is the primary benefit of using a case expression over multiple if statements in Ruby?
  • Video class: While Loops | Ruby | Tutorial 21 06m
  • Exercise: What is a 'while loop' commonly used for in Ruby programming?
  • Video class: Building a Guessing Game | Ruby | Tutorial 22 13m
  • Exercise: In the guessing game built using Ruby, what method is used to remove the newline character from user input?
  • Video class: For Loops | Ruby | Tutorial 23 04m
  • Exercise: In Ruby, what does a 'for loop' allow you to do?
  • Video class: Exponent Method | Ruby | Tutorial 24 05m
  • Exercise: In Ruby, what is the purpose of an exponent method that uses a for loop?
  • Video class: Comments | Ruby | Tutorial 25 04m
  • Exercise: What symbol is used to start a comment in Ruby?
  • Video class: Reading Files | Ruby | Tutorial 26 08m
  • Exercise: What is the purpose of using 'file.close' in a Ruby program?
  • Video class: Writing Files | Ruby | Tutorial 27 08m
  • Video class: Handling Errors | Ruby | Tutorial 28 08m
  • Video class: Classes 10m
  • Video class: Initialize Method | Ruby | Tutorial 30 07m
  • Video class: Object Methods | Ruby | Tutorial 31 05m
  • Video class: Building a Quiz | Ruby | Tutorial 32 09m
  • Video class: Inheritance | Ruby | Tutorial 33 07m
  • Video class: Modules | Ruby | Tutorial 34 05m
  • Video class: Inteactive Ruby (irb) | Ruby | Tutorial 35 04m

This free course includes:

4 hours and 14 minutes of online video course

Digital certificate of course completion (Free)

Exercises to train your knowledge

100% free, from content to certificate

Ready to get started?Download the app and get started today.

Install the app now

to access the course
Icon representing technology and business courses

Over 5,000 free courses

Programming, English, Digital Marketing and much more! Learn whatever you want, for free.

Calendar icon with target representing study planning

Study plan with AI

Our app's Artificial Intelligence can create a study schedule for the course you choose.

Professional icon representing career and business

From zero to professional success

Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.

You can also use the QR Code or the links below.

QR Code - Download Cursa - Online Courses

More free courses at Programming Languages ( Python, Ruby, Java, C )

Free Ebook + Audiobooks! Learn by listening or reading!

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate