jollygoodcode.github.io icon indicating copy to clipboard operation
jollygoodcode.github.io copied to clipboard

Lesser-Known Rails Command-Line Config File

Open JuanitoFatas opened this issue 11 years ago • 0 comments

The file ~/.railsrc was introduced in Rails 3.2 in which you are able to specify default command-line options to be used every time when you create a new Rails application with rails new.

This is my .railsrc:

--skip-bundle
--skip-test
--database=postgresql

So when I create a new Rails application, I'll get a Rails application that skips bundle install, skips test files (because I use RSpec most of the time) and use PostgreSQL for database.

You can also pass --no-rc to bypass options in ~/.railsrc, or --rc to specify where the .railsrc file is (if you don't store in the home directory).

Thanks for reading!

@JuanitoFatas :pencil2: Jolly Good Code

About Jolly Good Code

Jolly Good Code

We specialise in Agile practices and Ruby, and we love contributing to open source. Speak to us about your next big idea, or check out our projects.

JuanitoFatas avatar Oct 07 '15 16:10 JuanitoFatas