When running Rails apps with Postgres in development mode, you might notice output like this when running tests:
NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
It’s noisier than you need for day-to-day development. To quiet the noise, you could change a setting in your config/database.yml file:
min_messages: warning
However, we can set this machine-wide instead of project-wide, similar to the global .gitignore file and set noswapfile vim setting.
psql -d rails_app_development
ALTER ROLE SET client_min_messages TO WARNING;
Change “ to be the user account for your machine.
Bueno.
Written by Dan Croak.
Set a .gitignore file to apply across all projects on your local machine with:
git config --global core.excludesfile ~/.gitignore
The only ignored pattern I have right now is:
*.swp
That ignores temporary files created by vim.
I used to ignore those files in each project I worked on but then I recognized my presumptuousness: not every teammate on every project is also using vim.
For them, that line is unnecessary.
We might say, “Who cares? It’s only one line.” but I appreciate it when my teammates are similarly disciplined so I ought to apply The Golden Rule.
> “Programming at its best is an act of empathy.” - Kent Beck
What else do you have in your global ~/.gitignore?
Written by Dan Croak.