Journal Archives About Books Talks

Bootstrapping consistency

One of the best features of Rails is its consistent project layout. Thoughtbot recently shared how they use a ./bin/setup script to bring consistency to the project setup.

Regardless of the bin/setup file’s contents, a developer should be able to clone the project and run a single, consistent, reliable command to start contributing.

At GitHub, we use script/bootstrap, but the idea is the same — a consistent user experience to get from zero to productive on any new project. Whether I'm writing docs, extending GitHub with service hooks, or hacking our internal support tools, I know I can just clone the repository and run script/bootstrap to jump right in. Thanks to a patch from Matt Emborsky, this works for my dots, too.

We also don't stop with the project bootstrap. Our projects normally have script/test for running the local test suite, script/cibuild for running tests on the continuous integration server, as well as the usual script/server, and script/console scripts where applicable.

As a result, I spend less time thinking what to run and just run.

# Shared on