⭐️ New Course: Unpacked: Full-Stack GraphQL. Get early access!
Learn object-oriented programming using the Ruby language so you can write your own Ruby programs and jump right into Ruby on Rails.
Learn Ruby today and get ready for Ruby on Rails!
You'll discover how to build your own Ruby program from beginning to end, design Ruby classes, incorporate Ruby principles and techniques in your design, write your own Ruby gem, and make sense of the “magic” of Rails.
“If I were going to learn Ruby from scratch today, this is how I would do it!” Chad Fowler, Author of Rails Recipes and The Passionate Programmer
“The course is outstanding! The best I've ever taken. Rails is so much less mysterious now that I'm learning Ruby the right way.” Tony Barone
Build a Complete, Tested Ruby Program From Scratch
Master object-oriented programming the Ruby way.
In this course we follow a step-by-step, project-based approach to learning how to write well-designed Ruby programs. By building a real project with real code from scratch, you'll come away knowing how to write your own Ruby programs and have a deeper understanding of both the how and the why.
Ruby Programming Environment Ruby has a rich set of programming tools and libraries. Setting up your working environment and using it effectively is the first step toward becoming a productive Ruby programmer.
- Installing Ruby on your favorite operating system
- Running Ruby using the interactive Ruby shell (irb) and writing Ruby program files
- Using Ruby's documentation system to get help
- Installing external Ruby libraries using RubyGems
- Troubleshooting common problems
Ruby Language Constructs If you're already programming in another OO language, some of Ruby's constructs may feel familiar. But Ruby has some pleasant surprises, as well. Topics include:
- Expressions and variables
- Numbers, string, and symbols
- Loops and conditional expressions
- Arrays and hashes
- Classes, modules, and structs
Object-Oriented Programming Ruby is an object-oriented programming language. It's also a dynamic language. But what does that really mean and how does it change the way you write programs? We'll show you! Topics include:
- Using built-in Ruby classes
- Defining your own classes with state and behavior
- Creating unique objects
- Telling objects what to do by calling methods
- Modeling class-level inheritance relationships
- Sharing code with mixins
Object-Oriented Design Principles Defining classes and using objects is a good start, but along the way you'll also need to consider the overall design of your program. Can you make changes without ripple effects? Can you easily test the code? Can someone else use the code as a library? Topics include:
- Separation of concerns
- Don't Repeat Yourself
- Tell, Don't Ask
Blocks and Iterators Blocks are a fundamental and powerful aspect of the Ruby language. You'll find blocks used throughout good Ruby programs. And many of the methods found in the Ruby standard library itself take blocks. To be an effective Ruby programmer you must master blocks! Topics include:
- Calling built-in methods that take blocks
- Writing your own methods that yield to blocks
- Implementing custom iterators
- Effectively using blocks in your programs
Organizing Ruby Code Once you've conceptually organized your program into classes and modules, you'll want to further organize it for reuse, unit testing, and distribution.
- Creating a Ruby project structure
- Separating source files for easier reuse and testing
- Namespacing to avoid naming clashes
Input/Output Ruby has great support for interacting with the external world, whether it be through files, an interactive console, command-line input, or even the web. You'll need some form of I/O in your application, but once you learn Ruby's I/O libraries you might also start rewriting one-off scripts in Ruby, too. Topics include:
- Reading data from files
- Writing data to files
- Creating an interactive console prompt
- Handling command-line input
Unit Testing The Ruby community places a high value on testing, and it's for good reason. Testing gives you the courage to make changes, and as a result you're more productive. Topics include:
- Writing and running unit tests with RSpec
- Test-driven development and the red-green-refactor cycle
- Stubbing methods to control tests
- Refactoring code, safely!
Distribution Finally, you'll likely want to package up your Ruby code and share it with your friends… or the world! Topics include:
- Conforming to RubyGems conventions
- Writing a GemSpec
- Building a RubyGem
- Publishing a RubyGem to a public server
Ruby Programming Idioms Writing a Ruby program that works isn't always the same as writing a good Ruby program. To master Ruby—to write compact, readable, and flexible Ruby programs—requires that you learn the idioms and culture of the Ruby community. That's what this course is all about: becoming truly fluent in Ruby!
On average, students complete this course in roughly 20 hours which includes watching the videos and doing all the exercises in the workbook. Download the 23-Day Course Plan and we'll walk you through the course in short sessions day-by-day!
- 1. Introduction and Setup
- 2. Running Ruby
- 3. Numbers and Strings
- 4. Variables and Objects
- 5. Self
- 6. Methods
- 7. Classes
- 8. Attributes
- 9. Arrays
- 10. Objects Interacting
- 11. Separate Source Files
- 12. Unit Testing
- 13. Conditionals and TDD
- 14. Modules
- 15. Blocks
- 16. Symbols and Structs
- 17. Hashes
- 18. Custom Iterators
- 19. Input/Output
- 20. Inheritance
- 21. Mixins
- 22. Distribution
- 23. Wrap Up
For New Ruby and Rails Programmers
Want to learn Ruby, or become more confident with Rails? We designed this course for you!
New to OO programming? Perhaps you're looking to jump-start your programming career or join a Ruby/Rails project. It all starts here! You'll learn the fundamentals of object-oriented programming the Ruby way through live coding, animated visuals, and hands-on exercises. No prior programming experience is assumed.
New to the Ruby programming language? Maybe you've been intrigued by Ruby, but haven't yet had the opportunity to learn it comprehensively from beginning to end. Here's your chance to dive in! You'll learn all the things you'd expect in an OO language, as well as the things that make Ruby unique so you can exploit its true power.
New to the Rails web application framework? Perhaps your goal is to write (or maintain) web applications with Rails. You'll have a much smoother ride once you're comfortable with the Ruby language. By taking this course, you'll understand some of the "magic" behind Rails and, more important, you'll be in a better position to use it to your advantage.
Familiar with Ruby? If you've dabbled with Ruby, but wondering if you're using it to its full potential, this course will help you put it all together! Ruby is different than other languages, and you'll need to use different techniques to get the most out of it. You'll learn to design flexible Ruby programs using modules, mixins, dynamic typing, blocks, and so on.
We aim for 100% satisfied developers, so if this course turns out not to be a good fit for you, we'll gladly issue you a 100% refund.
Created by Mike and Nicole
Hi, we're real people just trying to share our passion for creating stuff!
Hey, there! Mike here. It's been over 10 years now since I first discovered Ruby, and I still use Ruby almost every day. It's a lot of fun and also an incredibly powerful language. I've had the pleasure of teaching Ruby to thousands of new and experienced developers over the years, and I look forward to having you in this course.
Together Nicole and I own and run The Pragmatic Studio. We'd love to have you join us in the Studio for this great course! Find out more about us…
Join thousands of others who have learned Ruby using this top-rated course!
“Your course has been one of the most amazing learning experiences I have ever had. I'm absolutely loving it. The speed of the course is perfect. The tone of the videos is just right, and the workbooks are great.” Ross Curzon-Butler
“First of all, Mike and Nicole were fantastic! Everything was explained clearly and step by step (and it really felt like they were explaining things directly to me). I was trying to learn Ruby on my own through various online tutorials, but they only offered bits of information that I did not know how to put together. This course was structured very well so I always learned things in context.” Marcin Drozd
“I think this was the best course I've ever seen online. It felt really well structured and seemed to give me just the right amount of knowledge from lesson to lesson.” Antonio Borges Rosado
“I've been trying to add Ruby and Rails to my tool belt for the past 3 years, and have tried a handful of books and online courses. But, I've never been able to stick with any until I tried your Ruby course. I'm loving the course!” Jeremy Kratz
“The course is great! It really teaches you how to think like a Ruby developer.” Matt Halliday
“I've been developing Ruby on Rails websites and apps for two years. This course gave me dozens and dozens of 'Ah-ha!' moments with regards to what is actually going on in my Rails apps. My confidence for building new Rails apps and refactoring my existing apps has increased tremendously.” Chip Ashby
“I have tried many things over the past year and nothing clicked. But your class really got me excited about Ruby. The best thing about your class is that you taught software design principles, not just how to run a loop or assign a variable. That is what made everything click and made it practical. You have really helped me further my goals!” Paul Haddad
“I did all the Ruby / Rails courses when I was working to get a better job. They were the single most powerful resources for me! Now I’m working on the other end and hiring a junior developer. We take them through some code challenges and applicates who have worked through Pragmatic Studio sail through all of our technicals. I recommend your courses to anyone looking to get into web development! Thanks again for such a great product.” Wassim Metallaoui