Ruby on Rails: Level I
Learn how to pragmatically build and design Ruby on Rails 5 apps in this step-by-step, project-based course.
Build a complete Rails web app from scratch, step by step!
You'll discover how to put all the pieces together to build a complete Ruby on Rails app from idea to deployment 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
Learn the Pragmatic Way
Create high-quality Rails apps from scratch. In this course we follow a step-by-step, project-based approach to learning how to design and incrementally build a complete database-driven web app using Rails 5. By building a real 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
Forms 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
Routing 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
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
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
Model Relationships 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
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
Deployment 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!
On average, students complete this course in roughly 27 hours which includes watching the videos and doing all the exercises in the workbook. Download the 30-Day Course Plan and we'll walk you through the course in short sessions day-by-day!
- 1. Introduction and Setup
- 2. Create the App
- 3. Views and Controllers
- 4. Models
- 5. Connecting MVC
- 6. Migrations
- 7. Helpers
- 8. Routes: Show Page
- 9. Routes: Linking Pages
- 10. Test-First (Optional)
- 11. Forms: Editing
- 12. Forms: Creating
- 13. Partials
- 14. Destroy
- 15. Custom Queries
- 16. Migrations Revisited
- 17. Layouts
- 18. Assets
- 19. Validations
- 20. The Flash
- 21. One-to-Many: Models
- 22. One-to-Many: Nested Resources
- 23. One-to-Many: Forms
- 24. One-to-Many: Logic
- 25. Deployment
- 26. Wrap Up
Cut Through The Confusion
Struggling to put all the pieces together? You're not alone. Folks trying to learn Rails typically wrestle with the same issues and ask the same questions:
- Where's the best place to start?
- How do all the pieces fit together?
- What are the Rails conventions really doing behind the scenes?
- Why does this code work (or not)?
- Am I doing it the right way?
We'll help you cut through all the confusion and get right down to what matters most so you can confidently create your first Rails app or jump right into an existing app.
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.
Also On This Path...
Meet Mike & Nicole
Howdy! Mike here. I helped build and launch one of the first production Rails apps way back in 2005. I've built countless Rails apps since then, and I continue to develop the Rails apps that power our online business. I co-taught the first official Rails course in 2006 and have had the pleasure of teaching Rails to thousands of developers since then. I'm also the author of Advanced Rails Recipes, co-author of Agile Web Development with Rails, and author of Pragmatic Project Automation.
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! Learn more about us…
Join thousands who have learned Rails using this top-rated course!
“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