We can use the ~/.railsrc
file to configure a set of default arguments we
want used whenever we run rails new
. The following is an example railsrc
file that alters some defaults:
--skip-test-unit
--skip-bundle
--database=postgresql
--skip-turbolinks
We can use any options that could be used with the rails new
command in our
~/.railsrc
file. Run rails new --help
to see the full list of arguments.
If you're looking for a more full featured Rails app generator then be sure
to check out Suspenders, our app generator that handles all of the above
and also updates the Gemfile, configures the stylesheets to our liking,
pre-configures Hound and CircleCI, and a whole bunch more.