attr_encrypted: Encrypts and Decrypts Your Attributes Transparently
attr_encrypted is a Ruby library by Sean Huber that generates attr_accessors that can encrypt and decrypt your attribute data transparently and on the fly. attr_encrypted comes as a gem, and isn't strictly for Rails only - it supports ActiveRecord and DataMapper out of the box, for example.
The README is so good that there's little else to say. All you need to do is add attr_encrypted :attribute_name, :key => 'some key' lines to your models and you're most of the way there.