My personal preferred template for starting a new Rails application.
- Ruby
- rbenv
- Node.js
- PostgreSQL (unless you specify a different database)
Use the template directly with rails new
:
rails new APP_PATH [options] --template=https://raw.githubusercontent.com/jbhannah/rails-template/HEAD/template.rb
or run a bootstrapping script that uses Bundler to install Rails, then forwards
options
to bundle exec rails new
:
curl -L https://raw.githubusercontent.com/jbhannah/rails-template/HEAD/bootstrap.rb | ruby - APP_PATH [options]
and then start your app:
cd APP_PATH # you can skip this if APP_PATH is .
bin/dev
When running the bootstrapping script, the following options are passed to
bundle exec rails new
:
--css=postcss
--database=postgresql
--devcontainer
--javascript=esbuild
--template=https://raw.githubusercontent.com/jbhannah/rails-template/HEAD/template.rb
With the exception of --template
, any options you specify will take priority
over these overrides.
[!CAUTION]
These overrides are not applied when using the template with rails new
, only
when running it as a bootstrapping script.
You can also (re)apply the template to an existing app:
bin/rails app:template LOCATION=https://raw.githubusercontent.com/jbhannah/rails-template/HEAD/template.rb
bundle install
rake --tasks
Copyright © 2025 Jesse Brooklyn Hannah. Licensed under the terms of the MIT License.