Ruby on Rails 5: Level I
Learn how to pragmatically build and design Rails 5 apps in this step-by-step, project-based course.
Build a full-featured Rails web app from from idea to deployment, step by step!
Learn how to put all the pieces together to build a complete Ruby on Rails 5 app from scratch in this course. You'll come away with a solid understanding of Rails as well as key design principles and practices to help you craft robust and flexible apps on your own!
“This is the best beginning Rails course I've found. I finally have a strong Rails foundation. Coming into the course, I had so many loose ends regarding how Rails worked, but I finished the course with the confidence to create my own app.” Brad Ballard
“This Rails course is fabulous! I took a few other courses, but still felt really confused. I learned a lot, feel more comfortable with Rails...This is my favorite Rails course.” Dana Nourie
Build a Full-Featured Rails 5 Web App From Scratch
Learn how to rapidly develop and deploy database-driven web apps the Rails way.
In this course we follow a step-by-step, project-based approach to learning. By building a real Rails 5 application with real code from scratch, you'll come away knowing how to create your own Rails apps and have a deeper understanding of both the how and the why.
Rails Programming Environment
Setting up your working environment and learning how to use it effectively is the first step toward becoming a productive Rails developer. We'll show you how to:
- Install Ruby on Rails on your favorite operating system
- Edit Rails code using the Sublime Text editor
- Use the Rails console and supporting command-line tools effectively
- Search Rails documentation
- Use external RubyGems in your application
- Troubleshoot problems and understand common error messages
The router is the central dispatch of your application. It receives incoming requests (URLs) and, depending on a set of rules, dispatches the requests to an appropriate controller action. You'll learn how to:
- Define routes that recognize incoming URLs
- Use named route methods to generate URLs based on the routing scheme
- Apply and understand the RESTful routing conventions
- Design apps to take advantage of the REST conventions in Rails
Views and Controllers
Rails has some strong opinions about how web apps should be designed. You've probably heard about the MVC design in the abstract, but we'll break it down in practice so you understand where to put your code and the benefits of a decoupled design. You'll learn how to:
- Write controller actions to handle incoming requests and render views, or redirect to other actions
- Design clean and flexible HTML 5 views using layouts, partials, and helpers
- Write custom view helpers to encapsulate presentation logic
- Remove duplication using before actions
Models and Database Design
Well-designed models are the foundation of any good Rails app. In the simplest form, a model is a Ruby class that encapsulates your application's business logic. But a model also often represents an entity stored in your database. Active Record is the object-relational mapping library that Rails uses to connect your business objects (models) to your database tables. You'll learn how to:
- Manage your database schema with migrations
- Use models to create, read (query), update, and delete records in your database
- Use validations to enforce data integrity
- Design models for better reuse and testability
Want to accept user input and store it in a database? Rails has a whole bunch of conventions to help you create robust and friendly forms. We'll unveil the "magic" and show you how to:
- Design a form for creating and editing data
- Validate form data and provide actionable feedback to the user
- Store submitted form data in a database and dynamically display the data
- Avoid common security pitfalls
CSS and Sass Basics
As a web developer, it's important to understand the basics of web design whether you aim to do it all yourself or plan to work hand-in-hand with a web designer. You'll learn how to:
- Decouple your presentation (style) from the content using CSS stylesheets
- Keep your stylesheets tidy and flexible using Sass extensions including variables, nested rules, and functions
- Effectively use what Rails calls the asset pipeline
One of the most powerful features of Rails is the ability to create relationships between different models and represent those relationships in a database. For example, if you're developing a movie review app then you'll need to associate each review with a particular movie. To do that properly, it's important to not only understand the Rails conventions but also what goes on behind the scenes. You'll learn how to:
- Design a one-to-many relationship in the database using foreign keys
- Declare associations in the models and use them to create associated records and navigate across the one-to-many relationship
- Use nested resources to design a user interface for a one-to-many relationship
- Encapsulate business logic that emerges once you have rich associations between models
Putting your Rails app into production shouldn't cause fear and trembling. Deploying Rails apps has gotten a lot easier over the years thanks in large part to cloud services such as Heroku. We'll show you how to deploy your Rails app for the first time, and incrementally push out updates. You'll learn how to:
- Set up a (free) Heroku account
- Put your application code in a Git repository
- Deploy your app to your Heroku account
- Run remote Heroku commands such as to migrate your production database
- Upload image files and store them on Amazon S3
- Roll out updates to your app with ease!
Test-First Development Using RSpec and Capybara
Both the Ruby and Rails communities place a high value on testing, and it's for good reason. Writing effective tests allows you to make changes and add new features with confidence. As a result, you're a more productive Rails developer. Throughout the course, you'll learn how to:
- Use a test-first development approach to confidently add new features
- Write and run high-level feature specs using RSpec 2 and Capybara
- Test lower-level business logic by writing model specs using RSpec
- Refactor your application code, safely!
Rails Best Practices
Standing up a Rails app that just works isn't the same as designing a good Rails app. Mastering Rails—writing compact, readable, and flexible code—starts by learning the conventions, practices, and idioms fostered by the Rails community. So, in addition to learning the ins and outs Rails, we'll take you a step further. You'll learn:
- An iterative (agile) development style that easily adapts to changing requirements
- Design techniques for removing duplication, encapsulating business logic, and properly aligning responsibilities
- And a bunch of practical tips and tricks used by the pros to get the most out of Rails!
For New Rails Developers
Want to learn and become more confident with Rails? We designed this course for you!
Getting started with Rails?
Perhaps you've been intrigued by Rails, but haven't yet had the opportunity to learn it comprehensively from scratch. It all starts here! You'll learn the fundamentals of developing web apps with Rails so you're ready to create your first Rails app or jump right into an existing app. No prior experience with Rails is assumed.
If you're new to the Ruby programming language or new to object-oriented programming in general, we strongly recommend taking our online Ruby Programming course prior to this course.
Curious how to develop using a test-first approach?
This course starts by introducing the basics of every Rails app: models, views, controllers, and routes. With that foundation in place, we then build the app using a test-first development approach with RSpec and Capybara. If your goal is to write high-quality Rails apps that you can change with confidence (and we think that's a very worthy and achievable goal!), then learning good testing techniques is key. You'll learn how to incrementally build a Rails app start-to-finish the test-first way.
Struggling to put all the pieces together?
Rails is a structured framework that relies on conventions to optimize development time and minimize the amount of code you have to write. This makes developing web apps a bit easier… once you understand how everything fits together. Through live coding, animated visuals, and hands-on exercises, you'll learn how to build a complete web app so you're more confident (and less frustrated) writing your own Rails code.
Ready for a refresh or a reload?
If you started learning Rails a while back but haven't used it in earnest, this course will help you quickly get back up to speed with the latest version of Rails and current development techniques!
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 with 💛 by Mike and Nicole Clark
Hi, we'd be delighted to have you along as we create stuff in the Studio!
We've been using Rails since version 1.0. In fact, Mike helped build and launch one of the first production Rails apps way back in 2005. Since then together we've built countless Rails apps, including the suite of apps that power this site and our custom video training platform. We still write Rails code almost every day, and we love it!
Mike co-taught the first official Rails course in 2006 which lead to us starting this little training company we call The Pragmatic Studio. He's also the author of Advanced Rails Recipes, co-author of Agile Web Development with Rails, and author of Pragmatic Project Automation.
As with all our courses, this is the course we would have wanted when we were learning Rails. One that's easy to jump into, doesn't get bogged down in syntax minutiae, and focuses on building a real Rails app. Nothing is held back: we tackle complex features by breaking down the concepts so everything makes sense. We've literally spent years designing and improving this course in a way that lets you learn everything in around a day. We hope you enjoy it!
Thousands have loved learning Rails this way!
Here's what some of them have to say…
“It is the absolute best for a first dive into Rails! It teaches you the correct way to start a new Rails app...If you go through the whole course, [the] magic will be explained and you’ll know what the Rails framework does instead of passively look at it do things for you.” Nico Schuele
“The Rails I course is leagues above some others I've tried. First of all, Mike and Nicole have skills as instructors, not just developers, so I didn't feel they were talking above my head. Also it's clear that the lessons and supporting files have been tested and edited -- because they work! The exercises in the example apps are very relevant and I left the course with a whole new level of expertise. I can't recommend this course enough!” Anne Richardson
“I completed a few Rails tutorials before but this course contained more lightbulb moments than the rest of them put together. The explanations were clean, clear, and precise, and breaking things down into diagrams really helped.” Jonathan Mundy
“This course is fantastic! I had read a couple of Rails tutorial books and sort of understood what the example code was doing, but was having trouble sorting out how to build my own app. This course really filled in some missing pieces.” Terrence Talbot
“After trying many online Ruby on Rails courses across the Internet, this is the most thorough and enjoyable introduction available. Rhys Yorke
“A partner and I just released and started getting sales on an RoR app I created. I was able to build the prototype in a weekend! You all are a big reason I was able to do it. You have done a wonderful job of taking a lot of the 'magic' out of Rails.” Justin Seiter
“It seems like there are a lot of courses and tutorials out there that are great if you already know how to program in another language, but there are none that I know of (other than Pragmatic Studio!) that is great for a complete beginner. After taking your Ruby course I feel like I have a solid foundation to stand on. Now, learning Rails has been a lot of fun instead of a lot of frustration.” Andrew Markle
“You guys rock! Your courses are great because they are in-depth but not in a burdensome way. Doing the videos and exercises are an excellent way to learn. I know I still have a lot to learn but at least now I'm confident enough to start hacking around on my own and get more proficient.” Scott Knight