Fixing a 'Connecting to database specified by database.yml' Loop

Occasionally an app is re-deployed but won't start. You open the log and you see 'Connecting to database specified by database.yml' being outputted. Here's how to fix that.

ActiveRecord How-To: Multiple Aggregate Counts Grouped by Day

How to aggregate and group multiple columns within a single table for metric views.