← Blog

Rails 6.1 adds --minimal option support

This blog is part of our Rails 6.1 series.

rails new my_app creates a new Rails application fully loaded with all the features.

If we want to omit some of the features then we needed to skip them like this.

# before Rails 6.1

$ rails new tiny_app
    --skip-action-cable
    --skip-action-mailer
    --skip-action-mailbox
    --skip-action-text
    --skip-active-storage
    --skip-bootsnap
    --skip-javascript
    --skip-spring
    --skip-system-test
    --skip-webpack-install
    --skip-turbolinks

Before Rails 6.1 it was not possible to skip things like active_job and jbuilder.

Rails 6.1

Rails 6.1 added a new option --minimal.


$ rails new tiny_app --minimal

All the following are excluded from this minimal Rails application.

  • action_cable
  • action_mailbox
  • action_mailer
  • action_text
  • active_job
  • active_storage
  • bootsnap
  • jbuilder
  • spring
  • system_tests
  • turbolinks
  • webpack

We can bundle webpack in this minimal app like this.


$ rails new tiny_app --minimal webpack=react

Database option can also be passed.


$ rails new tiny_app --minimal --database postgresql webpack=react

Check out the pull request for more details on this.

Sandip Mane avatar
Written bySandip Mane
Newsletter

Stay up to date with our blogs.

Subscribe to receive an email notification for a new blog post.