Default Ruby on Rails Options

A lot of times, we will create a new Ruby on Rails application and go through the process of our normal configuration setup. Sometimes, we will create a template to expedite our setup like in a recent screencast episode.

Other times, we will need to create a new Ruby on Rails application and we have a list of things that we want to skip. It can be annoying to remember or script out these things. When we create a new application, we can skip something like Turbolinks.

If this is a common occurrence, then this isn’t something we want to have to remember every time. Luckily, there is a much easier way to make these kinds of changes a default. Create a file .railsrc in your home directory.

Edit the file and paste in your overrides.

You can even set up defaults for webpack and a framework by adding the lines in the .railsrc file.

And it also works for database settings.