skip to content

In Rails 8.1, what does a plain `rails new` app ship with for the database, JavaScript, CSS, jobs, caching and deployment?

level: juniorimportance: must knowfreq 70%

answer

  1. omakase defaults, not a blank slate
  2. --database defaults to sqlite3
  3. --javascript defaults to importmap
  4. --css has no default
  5. Solid trio in place of Redis

basics

~20 s

A plain Rails 8.1 rails new picks SQLite, import maps with Turbo and Stimulus, Propshaft with plain CSS, Solid Cache, Solid Queue and Solid Cable instead of Redis, Puma, and a Dockerfile with Kamal and Thruster, plus RuboCop, Brakeman and bundler-audit binstubs.

solid answer

~40 s

With no flags, Rails 8.1's generator makes every choice for you: `--database` defaults to `sqlite3`, `--javascript` to `importmap` (so `importmap-rails`, `turbo-rails` and `stimulus-rails`, no Node), and `--css` has no default, so you get a plain `application.css` served by Propshaft, the only asset pipeline it offers. Jobs, caching and Action Cable run on `solid_queue`, `solid_cache` and `solid_cable`, backed by the database rather than Redis. Deployment is ready too: a production `Dockerfile`, `config/deploy.yml` for Kamal and `thruster` in front of Puma. The tooling layer adds `bin/rubocop`, `bin/brakeman`, `bin/bundler-audit`, `bin/ci` and a GitHub Actions workflow. In 8.1 there is no `bin/bundle` any more, and `.devcontainer` files appear only with `--devcontainer`.

code

bash · 3 lines
bash
rails new sensors
# equivalent to spelling out the defaults:
rails new sensors --database=sqlite3 --javascript=importmap

go deeper

for a junior

Recall the four defaults by flag: sqlite3, importmap, no CSS framework, Propshaft. Then name the Solid trio and the Kamal deployment files.

for a middle

Explain where each default lands: which Gemfile entries, which bin/ scripts and which installers run after bundle install, and how to override each with a flag.

for a senior

Judge which defaults a real project keeps: SQLite in production, Solid Queue in Puma, Kamal versus your platform. Know what 8.0 and 8.1 changed so you can read an older app.

for a principal

Treat the defaults as a team baseline: decide when a house template or a .railsrc preset is worth maintaining, and how far an app may drift from the generator.

## What "omakase" means for `rails new` **`rails new`** is the Rails application generator. In Rails 8.1 it does not hand you a blank skeleton and a list of decisions; it makes a complete set of choices for you, in the spirit of an omakase menu where the chef picks the dishes. Every choice has a flag, so the defaults are a starting point you can override, but an interviewer asking "what does a fresh app ship with?" wants to hear that set named precisely, because it tells them whether you know what a Rails 8.1 app looks like before anyone touches it. ## The choices the flags make when you pass none | Choice | Flag | 8.1 default | What you get | |---|---|---|---| | Database | `--database` / `-d` | `sqlite3` | `gem "sqlite3", ">= 2.1"`, database files under `storage/` | | JavaScript | `--javascript` / `-j` | `importmap` | `importmap-rails`, `turbo-rails`, `stimulus-rails`, no Node | | CSS | `--css` / `-c` | none | a plain `app/assets/stylesheets/application.css` | | Asset pipeline | only `--skip-asset-pipeline` | Propshaft | `gem "propshaft"`; there is no Sprockets option | | Web server | none | Puma | `gem "puma", ">= 5.0"` | The allowed database values are `mysql`, `trilogy`, `postgresql`, `sqlite3`, `mariadb-mysql` and `mariadb-trilogy`. The JavaScript values are `importmap`, `bun`, `webpack`, `esbuild` and `rollup`; the CSS values are `tailwind`, `bootstrap`, `bulma`, `postcss` and `sass`. ## What lands in the Gemfile - `rails` pinned to the generating release (`"~> 8.1.4"`), then `propshaft`, the database driver and `puma`. - **Hotwire**: `importmap-rails`, `turbo-rails` and `stimulus-rails`; `jbuilder` for JSON views. - **The Solid trio**: `solid_cache`, `solid_queue` and `solid_cable`, database-backed adapters for `Rails.cache`, Active Job and Action Cable. - **Boot and deploy**: `bootsnap`, `kamal` and `thruster`; `image_processing "~> 1.2"` for Active Storage variants; `tzinfo-data` for Windows and JRuby. - **Development and test**: `debug`, `bundler-audit`, `brakeman`, `rubocop-rails-omakase`; `web-console` in development; `capybara` and `selenium-webdriver` in the test group. - `bcrypt` is present only as a comment, for when you add `has_secure_password`. ## Scripts, configuration and deploy files - **`bin/`**: `rails`, `rake`, `setup`, `dev`, `rubocop`, `brakeman`, `bundler-audit`, `ci`, `thrust` and `docker-entrypoint`. After `bundle install`, the installers it runs add more: `bin/importmap` from `importmap:install`, `bin/jobs` from `solid_queue:install`, `bin/kamal` from `bundle binstubs kamal`. - **Deploy**: a production `Dockerfile`, `.dockerignore`, `config/deploy.yml` and `.kamal/secrets`. - **CI**: `.github/workflows/ci.yml`, `.github/dependabot.yml` and `config/ci.rb`. - **Config**: `config/application.rb` with `config.load_defaults 8.1`, a `/up` health-check route, and `.rubocop.yml` inheriting the omakase style. ## What a new 8.1 app does not get 1. **No `bin/bundle`.** Rails 8.1 stopped generating it; RubyGems now activates the right Bundler itself. 2. **No Sprockets.** `app/assets/config/manifest.js` belongs to older apps; Propshaft is the only pipeline the generator adds. 3. **No Redis.** Nothing in the default Gemfile needs it; the Solid adapters use database tables. 4. **No Node toolchain** with the default import maps and no `--css`, or with `--css tailwind` or `--css sass`, which use standalone gems. 5. **No `.devcontainer/`** unless you pass `--devcontainer`, and since 8.1.2 no `test/system` folder outside that case. ## Why interviewers ask it The question checks that a candidate's mental model is current. Someone who says "a new app needs Redis for jobs" or "Webpacker compiles the JavaScript" is describing Rails 6. Knowing the default set also tells you what to trim, because every item above maps to a flag: - `-d postgresql` (or `mysql`, `trilogy`, the MariaDB variants) swaps the driver gem and `config/database.yml`. - `-j esbuild` (or `bun`, `rollup`, `webpack`) swaps `importmap-rails` for `jsbundling-rails` and brings a JavaScript toolchain. - `--skip-solid`, `--skip-kamal`, `--skip-thruster`, `--skip-jbuilder` and the framework skips such as `--skip-action-mailbox` remove one piece each. Knowing which pieces a given app does not need (inbound email, Kamal, the JavaScript layer) is the first design conversation of a project. ## Reading an older app against these defaults Interviewers often hand you an existing codebase. A Gemfile with `sprockets-rails`, a `redis` gem for Action Cable, a `bin/bundle` file or a `package.json` that only exists to compile a small amount of JavaScript usually signals an app generated by an older release, not a deliberate choice. Compare it with the 8.1 defaults before assuming the team picked each part, and before copying those parts into a new app.

  • Which installers does Rails 8.1's `rails new` run after `bundle install`?
    With the defaults it runs `importmap:install`, then `turbo:install stimulus:install`, then `bundle binstubs kamal` and `kamal init`, then `solid_cache:install solid_queue:install solid_cable:install`. Those write `bin/importmap`, `config/importmap.rb`, `bin/jobs`, `config/queue.yml`, `config/cache.yml` and the Solid schema files. With `--skip-bundle` (`-B`) none of them runs, so you finish those steps by hand.
  • Why does a default app's `config/application.rb` say `require "rails/all"`, and when does that line change?
    `rails/all` loads every framework railtie. When any framework is skipped, the generator instead writes `require "rails"` followed by one `require` per railtie, such as `"active_record/railtie"` and `"action_mailbox/engine"`, with the skipped ones commented out, so you can see and re-enable them later.

  • A new Rails 8.1 app still needs Redis for jobs, caching and Action Cable.
  • rails new defaults to PostgreSQL as the database.
  • The default JavaScript setup needs Node and esbuild through jsbundling-rails.
  • Tailwind is the default --css choice in Rails 8.1.
  • The asset pipeline is Sprockets with app/assets/config/manifest.js.
  • rails new generates bin/bundle to pin the Bundler version.

Assumes Rails 8.1.4; the Solid trio, Propshaft-only pipeline, Kamal and Thruster defaults date from 8.0, bin/bundler-audit and the dropped bin/bundle from 8.1.