Avoiding a series of tests with Ruby Hashes of Hashes that might have nil before the leaf hash

I’m mostly using Ruby to write Opscode Chef Cookbooks. There are a lot of hashes of hashes that contain attributes or Data Bags. Things that look like:

app['rds_database'][environment]['rds_name']

If I wanted to test if this value is set I couldn’t safely just say:

if app['rds_database'][environment]['rds_name']

because in some cases

if app['rds_database']

or

if app['rds_database'][environment] [...]

Using the Official Opscode 0.8.x Gems to build EC2 AMI Chef Client and Server

Updates Mar 3, 2010 Added call to script ec2-set-defaults that is normally called on ec2 init that sets the locale and apt sources for EC availability Zone Introduction

Opscode has officially released 0.8.x of Chef. It is now even more fabulous. I’ve been using the pre-release version for the last couple of months and [...]

Installing Ruby Mysql Gem on Snow Leopard Server

Snow Leopard  Server (and at least Leopard Server) both have MySQL installed already. But its not a complete enough install to build the Ruby Mysql Gem. It seems that the Snow Leopard Server Mysql does not include all the client stuff that is needed by the mysql gem.

The Apple Support article: Mac OS X [...]

Want to work at a Startup with Cool Tech? (HBase, Clojure, Chef, Swarms, Javascript, Ruby & Rails)

Opportunity Knocks

Runa.com, the startup where I am CTO, is looking for great developers to join our small agile team. We’re an early stage, pre-series-A startup (presently funded with strategic investments from two [...]