
The complete guide to `rails new` in Rails 8.1
rails new --help prints 30+ options. Most tutorials stop at rails new myapp -d postgresql and move on. This post covers every Rails 8.1 option - what it does, when to use it, and what most people pick. App Mode --api - Strips views, cookies, sessions, asset pipeline, Hotwire , CSS, and JavaScript. Use for pure JSON or GraphQL backends. --minimal - Generates the smallest possible app. Skips Action Mailer, Action Mailbox, Action Text, Active Job, Active Storage, Action Cable, Hotwire, Jbuilder , tests, system tests, Kamal , Thruster , Solid, and Bootsnap . A good starting point when you want to add only what you need. Database ( --database=X ) Adapter Pros Cons Best for sqlite3 (default) Zero setup, no server, works with Solid stack. 37signals runs ONCE products on it in production. Single-writer, no multi-server scaling. Solo devs, prototypes, single-server apps postgresql ⭐ Full-featured (JSONB, arrays, full-text search), every PaaS supports it, best managed DB options. Requires a runn
Continue reading on Dev.to Tutorial
Opens in a new tab




