Posts tagged trick


Rescue multiple exceptions in Ruby

ruby trick exceptions rescue | comments

Little Ruby trick that made my night:

module ApiError
  HttpExceptions = [
Continue reading »


Zero downtime deploys for Rails apps - slides

rails database trick migrations | comments

Here are the slides for my talk on zero downtime deploys for Rails applications, presented at RailsConf 2012.

Really glad I had the opportunity to present here; hoping this will get people motivated to start thinking about the topic, and change the way we address the issues described there.

Continue reading »


Hot compatibility beyond databases

rails database trick migrations | comments

Hot compatibility doesn't only apply to database migrations. Modern web applications can have a wide range of dependencies that without proper planning will break your deploy in subtle, unexpected ways.

Continue reading »


Rails migrations with no downtime

rails database tricks migrations | comments

Lets understand the challenge of changing a Rails database without introducing any downtime with a simple, apparently harmless migration:

class ApparentlyHarmlessMigration < ActiveRecord::Migration
Continue reading »


Managing a Rails app database with different branches

rails database tricks | comments

Relying on migrations to setup your Rails database when you have multiple branches is pretty hard. And slow. And blows away your data.

Instead I decided to simply have one database for each branch, defaulting to master. So this is my new database.yml:

Continue reading »