A war story: we built fast on MongoDB, hit the limits of the document model, ran Mongo and Postgres side by side in one Rails app, and migrated collection by collection to Postgres without downtime. What it cost, how we did it, and what we'd do differently.
Selling in more than one currency sounds like a display problem and turns out to be a data-modelling one. A deep-dive on representing money correctly, storing prices across currencies, exchange rates, rounding, and the mistakes that cost real money.
The N+1 query is the most common performance bug in Rails apps, and it hides perfectly in development. A deep-dive on what causes it, the difference between preload/eager_load/includes, counter caches, and how to catch it automatically.
Postgres 9.4 brings JSONB — indexed, queryable JSON inside a relational column. A deep-dive on when to reach for it, how to query and index it, the Rails 4.2 integration, and the trap of treating your SQL database like a document store.
The Rails 4.2 release candidate is out. A look at the three changes that matter most — a unified background-job API, a quietly large performance gain in ActiveRecord, and foreign keys finally landing in migrations.
Users misspell things, and exact matching fails them silently. A practical deep-dive into trigram-based fuzzy matching in Ruby — how it works, how to make it fast, and when to push it into Postgres instead.
Rails 4.0 has just shipped. Here is a thorough, from-the-trenches look at what we are adopting on real projects — strong parameters, the Turbolinks trade-off, Russian-doll caching, first-class Postgres, and the upgrade gotchas.