Create a new Rails application with smart defaults
Generates a new Rails application with customized options and smart defaults based on requirements.
/plugin marketplace add bastos/rails-plugin/plugin install bastos-ruby-on-rails@bastos/rails-pluginapp_name [options...]Create new Rails app: $ARGUMENTS
Generate a new Rails application with customized options based on the request.
rails new app_name [options]
| Option | Description |
|---|---|
--database=DATABASE | Preconfigure database (postgresql, mysql, sqlite3) |
--api | API-only application (no views/assets) |
--minimal | Minimal Rails app (fewer defaults) |
--skip-test | Skip test files |
--skip-system-test | Skip system test files |
--skip-action-mailer | Skip Action Mailer |
--skip-action-mailbox | Skip Action Mailbox |
--skip-action-text | Skip Action Text |
--skip-active-storage | Skip Active Storage |
--skip-action-cable | Skip Action Cable |
--skip-hotwire | Skip Hotwire (Turbo + Stimulus) |
--skip-jbuilder | Skip Jbuilder |
--skip-bundle | Don't run bundle install |
--css=FRAMEWORK | CSS framework (tailwind, bootstrap, bulma, postcss, sass) |
--javascript=BUNDLER | JS approach (importmap, esbuild, rollup, webpack) |
--skip-javascript | Skip JavaScript |
# PostgreSQL (recommended for production)
rails new myapp --database=postgresql
# MySQL
rails new myapp --database=mysql
# SQLite (default)
rails new myapp
Full-stack app with PostgreSQL and Tailwind:
rails new myapp --database=postgresql --css=tailwind
API-only app:
rails new myapp --api --database=postgresql
Minimal app:
rails new myapp --minimal --database=postgresql
Skip testing (using RSpec instead):
rails new myapp --database=postgresql --skip-test
Modern full-stack with esbuild:
rails new myapp --database=postgresql --javascript=esbuild --css=tailwind
Based on user request, determine:
After running rails new, suggest:
cd app_namerails db:createGenerate the appropriate rails new command based on the user's request.