What is this?


The main idea behind Rails Companion is to try to build a complete web application in Ruby from scratch, without using Rails, to understand how web applications work and the core ideas behind web frameworks like Ruby on Rails, such as controllers, views, routing, middleware, and much more.

In the process, we'll also gain a deeper understanding of, and an appreciation for everything that Rails does for us.

Here's how I've structured the course: In each lesson, we will build a specific feature from scratch, using Ruby. At the end of each lesson, we will understand the corresponding topic in Rails. The course will walk you through from the start to the finish of a complete working web application, and help you learn by doing

For example, in the third chapter we will build our own router from scratch. Once you understand what a router is and how a simple router works, we will do a deep dive into the Rails router. That will give you a solid foundation in Rails as well as the concept of routing in web applications. 


Understanding a Rails feature by implementing it will force you to think about that feature from first principles and in-context, which will reinforce your learning.



But, why reinvent the wheel?


For the past year, I've been teaching Ruby and Rails to a group of students. A big motivation was to show them just how much fun programming can be with Ruby and Rails, in contrast to the standard engineering curriculum that focuses on C++ and Java.


Anyway, although most of them picked up Ruby pretty quickly and even started building simple Rails and Sinatra apps, I found that many struggled with understanding how various components fit together to form a working web application.

For example, here're a few recurring themes of questions I've seen pop up, again and again:


1) What really happens from the moment you type a URL in the browser until the application loads on the screen?
2) How Rails Handles incoming requests from the browser?
3) What are Puma and Rack, and how they fit in with Rails?
4) What is Routing and how to dispatch an incoming HTTP request to the Ruby code (a Rails controller)?
5) How is data passed from the controller to the views, and how Rails generates the HTML from the ERB template?
6) What's involved in sending the generated HTML response to the browser?
7) How ActiveRecord classes pull the data from the database?

and many more...


Which is not uncommon, since I struggled with the same questions when I was trying to learn about web application development.


But if there's one thing that I've learned about learning itself is that to understand the benefits of any tool, you should try to accomplish the same task without using that tool.


Ruby on Rails is not different.


It's a tool that helps us quickly build web applications. And I think we'll have a much better understanding and appreciation of all the things Rails does for us by trying to build a simple yet complete web application without it, trying to implement many of its features ourselves.


This technique has really helped my students, and it also helped me improve my knowledge of Rails. I think it will help you, too.


So, in this course, we will build a web application using only Ruby, without an ounce of Rails.

I hope it will give you a peek under the hood and explain many of the core concepts in Rails, like routing requests, passing data from controllers to views, working with a database, processing forms, and much more.


Who are you?

My name is Akshay, and I am a software developer based in Canada. I write a blog focused on Ruby and Rails that's read by more than 30,000 developers all over the world.

Curriculum



  Let's Build a Web Application in Ruby (Without Rails!)
Available in days
days after you enroll
  Understanding Rack, both the Protocol and the Gem
Available in days
days after you enroll
  Build Your Own Router in Ruby
Available in days
days after you enroll
  Let's Implement the Controllers
Available in days
days after you enroll
  Serving Static Files
Available in days
days after you enroll
  How to Implement Rails-like Dynamic Views in Ruby
Available in days
days after you enroll
  Implementing Logging
Available in days
days after you enroll
  Introducing Models and Autoloading with Zeitwerk
Available in days
days after you enroll
  Understanding Rails Middleware and Extracting Logging Middleware
Available in days
days after you enroll

How much does it cost?


Your Instructor


Hi! I'm Akshay, a software developer living in beautiful Victoria, BC in Canada.


I've been programming for the last decade and blogging non-stop on Ruby and Rails for the past two years on my website, Write Software, Well.

I love programming in Ruby and building web applications with Rails. I love sharing my learnings and to spread the joy of programming in Ruby with the world.

My blog has helped thousands of students learn Ruby and Rails and enjoy their day-to-day job as programmers.


I am not a Ruby or Rails expert by any shape or form, but I've found that I've learned the most from the people just a few steps ahead of me. And I hope to teach those who are just a few steps behind of me.


Frequently Asked Questions


When does the course start and finish?
The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.

How long do I have access to the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.

Will I get the source code?
Yes! All of the source code will be made freely available to you.

What if I discover a mistake or want to comment on the material?
Well, I'd really love to hear from you! Drop me a line here.

I know a different way to do this! What gives?
Yes! No doubt some of you will know, or find, different ways to do these things. In programming, there are often a million different ways to achieve the same result, and my answers are but one way! However, the goal for the course is to explain the "why" behind the major concepts and the need for a particular framework feature.


Why am I being charged VAT?
In order to comply with EU regulations, buyers in the EU will be charged VAT at checkout. This money is passed on to the relevant EU tax collection agency.