High Leverage Rails
Introduction
Introduction to this course
Why use Ruby on Rails
Why use SQLite
Ruby on Rails + SQLite
Powering Your App with SQLite
Creating tables
Timestamps
Column types
Typeof
Ruby types
Creating table introduction
Creating table advanced
Inserting data
Updating data
Upserting data
Reading data
Virtual columns
Enums
Introduction to JSON
Indexing JSON
JSON table functions
Building a Modern Rails Application
Creating a new Rails application
Installing Solid Queue
Installing Solid Cache
Installing Solid Cable
Dockerfile
Application overview
Authentication
Base styles
Registration
Scaffolding posts
Polishing posts
Scaffolding comments
Polishing comments
Polishing models
Polishing controllers
Creating new post
Updating post
Reviewing MVP
Tagging posts
Custom tags
Friendly URLs
Full text search
Deploying & Operating Your App
Backups
Check Litestream locally
Verifying backups
Deployment options
Deploying with Hatchbox
Deployment constraints
Vertical scaling
Database access
Migrations
Watch for free

Enter your email below to watch this video

Video thumbnail
Building a Modern Rails Application
Creating a new Rails application

Full Course

$
129
$179
USD, one-time fee
Excellent course on building a web app with the modern Rails 8 stack and the solid trifecta! Loved the deep dive into Ruby and SQLIte data types.
Onur Ozer
Onur Ozer

Move fast and fix things

Application monitoring that helps developers get it done.

Rails hosting made simple

Deploy apps to servers that you own and control.

Summary

Learn how to create a new Rails 8 app with SQLite3, Tailwind CSS, and ESBuild for modern web development. Explore Rails' convention over configuration approach, which automates setup for seamless development. See how Rails 8 ensures production readiness with built-in SQLite support and front-end tools.

Links

Install Ruby on Rails Guide

Video Transcript

It’s time to start building our Rails app.

Before we begin, you’ll need to have Ruby on Rails installed on your system. I won’t be walking through the installation process, but I’ve included links below with detailed guides for different environments and operating systems.

Once you have Ruby on Rails installed, starting a new Rails application is incredibly simple. We use the rails new command to generate our app.

Creating a New Rails 8 App

Let’s move over to the terminal and run the command:

rails new lorem-news --database=sqlite3 --css=tailwind --javascript=esbuild

This creates a new app called Lorem News, a basic Hacker News clone, and specifies three key options:

  1. Database: SQLite3 → This is actually the default, but I specify it for clarity.
  2. CSS Framework: Tailwind → A powerful utility-first CSS framework that keeps styling simple and efficient.
  3. JavaScript Bundler: ESBuild → A fast JavaScript bundler that compiles assets without unnecessary complexity.

By default, Rails does not require a JavaScript bundler—it allows you to use import maps instead. However, I prefer using ESBuild because it’s lightweight, fast, and flexible while giving me more control over asset management.

Rails App Generation: Convention Over Configuration

Running the rails new command triggers Rails to:

  • Create a directory for the new app (lorem-news).
  • Generate all necessary files and folders for a full-stack Rails application.
  • Install dependencies (bundle install for Ruby gems, yarn add for JavaScript).
  • Set up Tailwind and JavaScript dependencies.
  • Prepare a Procfile.dev to manage development processes.

This process follows Rails’ philosophy of “convention over configuration.”

Instead of manually setting up file structures, configurations, and dependencies, Rails automates everything, ensuring that your app is ready for development and even production right away.

Exploring the Rails App Structure

After everything is set up, we navigate into our new directory:

cd lorem-news

Next, let’s open the project in our code editor and explore the key files and directories:

  • app/ directory → The core of the application, containing models, views, and controllers.
  • Gemfile → Contains Ruby dependencies managed by Bundler.
  • package.json → Lists JavaScript dependencies, including ESBuild, Stimulus, and Turbo Rails.
  • tailwind.config.js → Configures Tailwind CSS, specifying where views and styles live in the app.
  • config/ directory → Stores configuration files for database settings, environment variables, and routing.
  • db/ directory → Manages database migrations and schema files.

Rails 8: A Production-Ready Setup from the Start

One of the most powerful aspects of Rails 8 is that it ships with everything you need for production—right from the initial rails new command.

Even though our app currently has no functionality, it is already fully deployable with built-in support for SQLite’s operational simplicity.

In the next few videos, we’ll break down:

  1. The key dependencies Rails 8 sets up by default.
  2. How these tools work together to create a smooth development experience.
  3. How to take this production-ready setup and start building real features.

Let’s dive in! 🚀