Interactive roadmap
Ruby on Rails roadmap
Designed for complete beginners who want to build full-stack web applications quickly. By the end, you will be able to create, test, and deploy your own custom Rails websites.
- 1
Learn Ruby Basics
0 of 4 done
Master the fundamentals of the Ruby programming language before diving into Rails.
Take your time with these core building blocks; a solid grasp of Ruby makes learning Rails much easier. - 2
MVC and Routing
0 of 3 done
Understand the architecture of Rails and how web requests reach your code.
Draw out how requests move from the browser to the controller on a piece of paper to visualise the flow. - 3
Database and Active Record
0 of 4 done
Store and manage your application data using databases and Rails models.
Always write migrations for database changes rather than editing tables directly; it keeps your work reproducible. - 4
Views and Forms
0 of 3 done
Build the user interface so people can see and interact with your app.
Keep your views clean by moving complex logic into helpers or models whenever possible. - 5
Authentication and Background Jobs
0 of 2 done
Add user accounts, security, and tasks that run behind the scenes.
Never store plain passwords in databases; always rely on secure hashing tools. - 6
Testing and Deployment
0 of 3 done
Make sure your app works properly and put it online for everyone to use.
Write tests as you build features; catching bugs early saves hours of frustration later.
Learn it all, with a tutor that never sleeps
Every topic links to LevelUp lessons, practice exercises and the 24/7 AI Tutor. Your progress updates as you master lessons.
Every topic explained
Step 1: Learn Ruby Basics
- Learn how to store text, numbers, and lists in Ruby. This is the foundation for writing any code.Ruby Documentation (Ruby lang)
Read more
Variables and data types are the foundation of any programming language. Variables act like labelled storage boxes where you can keep pieces of information, such as text, numbers, or lists. For example, you might create a variable named username to store a person's profile name or a variable named item_count to keep track of items in a shopping cart.
Understanding these types matters because Ruby handles text differently than numbers. Knowing how to store and retrieve this data safely is the first step towards building dynamic programs that can remember user input and perform calculations.
- Variables are named containers for storing data values.
- Common data types include strings, integers, floats, and arrays.
- Ruby uses simple assignment using the equals sign.
- Write reusable blocks of code and use if statements to make decisions in your programs.
Read more
Methods are reusable blocks of code that perform a specific task, helping you avoid repeating yourself. Control flow uses if statements and loops to let your program make decisions based on changing conditions. Imagine an online shop checking if a customer is logged in; if true, it shows their dashboard, and if false, it shows a login prompt.
This matters because real applications need to make choices and run tasks multiple times without duplicating code. Mastering methods and control flow lets you write clean, logical Ruby programs.
- Methods group code to perform specific tasks.
- Control flow uses conditional statements like if, else, and unless.
- Methods can accept arguments and return calculated values.
- Understand how Ruby treats everything as an object, grouping data and behaviour together into classes.
Read more
Object-oriented programming treats everything in Ruby as an object with its own data and behaviours. Classes act as blueprints for creating these objects. For instance, a User class might define attributes like email and password, along with actions like signing in.
This matters because Rails relies heavily on objects to represent things like database records and web requests. Organising your code into classes keeps your projects tidy, maintainable, and easy to scale as they grow.
- Classes are blueprints for creating individual objects.
- Objects combine data attributes with behaviour methods.
- Inheritance lets classes share common features.
- (optional)
- Use package managers to install pre-built code packages that add extra features to your projects.
Read more
Gems are pre-built packages of Ruby code created by the community to solve common problems. Bundler is the tool that manages these gems and ensures your project has all the right versions installed. Think of it like using pre-made furniture kits instead of chopping down trees to build a chair from scratch.
This matters because gems save you from writing complex features like user authentication or payment processing yourself. Using Bundler keeps your dependencies organised and secure.
- Gems are reusable Ruby libraries and packages.
- Bundler manages project dependencies and versions.
- The Gemfile lists all external packages your app needs.
Step 2: MVC and Routing
- Learn how the Ruby on Rails framework speeds up web development using convention over configuration.Ruby on Rails Guides
Read more
Ruby on Rails is a web application framework built on the Ruby language. It follows the principle of convention over configuration, meaning it provides sensible defaults so you do not have to write endless setup files. Imagine walking into a furnished kitchen where all the utensils are already in their designated drawers.
This matters because Rails lets you build full-stack web applications incredibly fast. By removing tedious setup work, you can focus on building unique features for your users.
- Rails is a full-stack web application framework.
- Convention over configuration reduces setup boilerplate.
- It emphasizes fast development and developer happiness.
- Discover how Models, Views, and Controllers work together to handle data, user interface, and logic.
Read more
The Model-View-Controller pattern splits your application into three distinct parts to keep code organized. The Model handles database data, the View manages what the user sees, and the Controller acts as the traffic cop between them. Think of a restaurant where the customer views the menu, the waiter takes the order to the kitchen, and the chef prepares the food.
This matters because mixing database logic with HTML code creates messy apps. MVC keeps your code modular, making it much easier to test and maintain over time.
- Models handle data logic and database interaction.
- Views display the user interface and HTML pages.
- Controllers coordinate actions between models and views.
- Map incoming web browser URLs to the correct controller actions in your application.
Read more
Routing is the system that maps incoming web browser URLs to the correct controller actions. When someone visits your website address, the router decides which piece of code should handle that request. For example, visiting yourwebsite.com/posts should direct traffic to the posts controller index action.
This matters because clean routes make your application predictable for both users and search engines. Setting up routes correctly is the first step in making any page accessible on your site.
- Routes connect URL paths to controller actions.
- Rails uses a file named routes.rb for configuration.
- RESTful routes map standard CRUD operations efficiently.
Step 3: Database and Active Record
- Write Ruby scripts that safely create and update your database tables over time.
Read more
Database migrations are Ruby scripts that safely create and modify your database tables over time. Instead of writing raw database commands, you write migration files that Rails translates for whichever database system you use. Imagine editing a shared blueprint so all builders know to add a new room.
This matters because migrations allow teams to share database changes smoothly. You can roll back updates if something goes wrong, keeping your data structures consistent across different computers.
- Migrations are version-controlled database schema changes.
- They let you create and alter tables using Ruby code.
- Commands let you run or rollback database updates easily.
- Use Rails built-in tool to talk to your database using plain Ruby instead of complex SQL queries.
Read more
Active Record is the built-in Rails tool that lets you interact with your database using plain Ruby instead of complex SQL queries. It maps database tables to Ruby classes and rows to individual objects. For example, instead of writing SQL select statements, you simply type Article.all.
This matters because it speeds up development and keeps your database code readable. Active Record handles the heavy lifting behind the scenes so you can focus on application logic.
- Active Record connects Ruby classes to database tables.
- It replaces raw SQL queries with readable Ruby methods.
- Provides built-in methods to find, create, and update records.
- Connect different database tables together, such as linking users to their posts.
Read more
Model associations let you connect different database tables together to represent real-world relationships. In Rails, you define these connections using simple keywords like belongs_to and has_many. For example, a User has many Posts, and each Post belongs to a specific User.
This matters because real applications involve related data that needs to stay connected. Associations make it effortless to fetch related records without writing complicated manual queries.
- Associations link separate database models together.
- Common types include has_many, belongs_to, and has_one.
- They make retrieving related data clean and intuitive.
- (optional)
- Ensure data is clean and correct before saving it to your database.
Read more
Validations check that data is clean, complete, and correct before Rails saves it to your database. Callbacks are custom methods that trigger automatically at specific moments in an object's lifecycle, like before saving. Imagine a form that refuses to submit until you fill in your email address.
This matters because bad data can break your application or cause security issues. Validations ensure your database only stores high-quality, trusted information.
- Validations prevent invalid data from entering the database.
- Common checks ensure fields are present, unique, or within length limits.
- Callbacks run code automatically at key points in an object lifecycle.
Step 4: Views and Forms
- Embed Ruby code directly inside your HTML web pages to display dynamic content.
Read more
ERB stands for Embedded Ruby, allowing you to mix Ruby code directly inside your HTML web pages. You can use special tags to insert dynamic data or loop through lists of records. Imagine a dynamic invoice template that automatically fills in customer names and prices.
This matters because static HTML pages cannot change based on who is viewing them. ERB templates let you build dynamic pages that display live data straight from your database.
- ERB allows Ruby code to run inside HTML files.
- Special tags output data or run control flow loops.
- Layout files help share common headers and footers across pages.
- Create HTML forms easily using built-in helper methods that connect straight to your models.
Read more
Rails form helpers are built-in methods that generate HTML forms and connect them directly to your models. They automatically handle security tokens and map input fields to database attributes. Think of a pre-formatted registration slip that ensures your details go into the right boxes.
This matters because writing raw HTML forms by hand is tedious and prone to errors. Form helpers save time and protect your app against common web vulnerabilities.
- Form helpers generate clean HTML form tags automatically.
- They bind input fields directly to Active Record model attributes.
- Includes built-in security features like CSRF protection.
- (optional)
- Add CSS styling and JavaScript interactivity to make your web pages look and feel great.
Read more
The asset pipeline and modern bundlers manage your CSS stylesheets, JavaScript files, and images. They compress and organise these assets so your web pages load quickly for users. Imagine a staging area where designers neatly package graphics before putting them on display.
This matters because good styling and smooth interactivity make your application enjoyable to use. Managing these assets properly ensures your site looks great on both desktop and mobile devices.
- Handles CSS stylesheets, JavaScript, and images.
- Compresses and bundles files for fast web performance.
- Integrates modern front-end build tools smoothly into Rails.
Step 5: Authentication and Background Jobs
- Allow users to sign up, log in securely, and protect private pages from strangers.
Read more
User authentication lets people sign up, log in securely, and protect private pages from unauthorized visitors. Rails provides tools like has_secure_password to encrypt passwords safely before storing them. Imagine a members-only club where you need a membership card and a secret PIN to enter.
This matters because user data privacy is essential for modern web applications. Proper authentication ensures personal accounts and sensitive information remain secure.
- Authentication verifies user identity during login.
- has_secure_password handles password encryption automatically.
- Sessions keep track of logged-in users across page requests.
- Run slow tasks like sending emails in the background so your website stays fast for users.
Read more
Background jobs let you run slow tasks, like sending welcome emails or processing images, outside of the main web request. Instead of making the user wait for an email to send, Rails queues the task to run quietly in the background. Imagine dropping an order slip in a basket so the kitchen can prepare it while you chat.
This matters because slow web pages frustrate users. Background jobs keep your website feeling fast and responsive by handling heavy tasks asynchronously.
- Background jobs handle slow tasks asynchronously.
- Keeps web requests fast and responsive for users.
- Queues manage tasks like sending emails or processing uploads.
Step 6: Testing and Deployment
- Use automated test scripts to check your code works so you do not break things later.
Read more
Writing tests involves creating automated scripts that check if your application code works correctly. Rails comes with a built-in testing framework that lets you verify models, controllers, and user flows. Imagine an automated quality control machine that tests every product coming off a factory belt.
This matters because testing gives you confidence that new changes will not break existing features. It saves you from manually clicking through every page of your site after every update.
- Automated tests verify that your code works as expected.
- Rails includes built-in support for unit and integration tests.
- Running test suites prevents accidental bugs when updating code.
- Upload your finished Rails application to a cloud hosting provider so the public can visit it.
Read more
Deployment is the process of uploading your finished Rails application to a cloud hosting provider so the public can visit it. Services like Render, Heroku, or Fly.io take your code, set up a database, and give you a live web address. Imagine moving your shop from your garage into a high street storefront.
This matters because building an app locally is only half the battle. Deployment brings your project to life, allowing real users to access your creation from anywhere in the world.
- Deployment publishes your app to a live cloud server.
- Cloud platforms handle databases, domains, and server maintenance.
- Environment variables keep secret API keys safe in production.
- (optional)
- Configure Rails to serve JSON data instead of HTML views for mobile apps or front-end frameworks.
Read more
API mode configures Rails to serve raw JSON data instead of HTML views, turning your backend into a data provider. This is useful when building apps with separate front-end frameworks like React or mobile apps for iOS and Android. Imagine a kitchen that prepares meals packaged for delivery rather than serving customers at tables.
This matters because modern applications often power multiple platforms beyond standard web browsers. API mode strips out unnecessary web view code to keep your backend lean and fast.
- API mode configures Rails to output JSON data.
- Removes unnecessary view and asset middleware for speed.
- Ideal for powering mobile apps and JavaScript front ends.