Using Sanitize Email to Preview HTML Emails Locally

April 30th, 2009 by

John Trupiano has a great post to get you started with sanitize_email for Ruby on Rails.

I wanted to preview my HTML emails without having to fill up my online email inboxes with tons of email (and then I’d have to make filters too). I also didn’t want to manage actually sending real email. So, I set up my machine for local delivery. Read on for instructions.
Read the rest of this entry »

Integrity CI on Passenger 2.2.2 with Ruby Enterprise Edition on Ubuntu 8.04

April 26th, 2009 by

I just spent a few hours trying to get this configuration sorted out, so I thought I’d share my notes. My goal was to get Integrity running on Passenger with Ruby Enterprise Edition. However, I couldn’t get the user Integrity/Apache was running as to use the proper PATH.

Whenever Integrity would try to build my project, I’d get an error about rake not being able to be found: sh: rake: not found

Read the rest of this entry »

Reintroducing sanitize_email | Work with Production Email without Fear

April 25th, 2009 by

An issue I have to tackle on almost every project I encounter is developing, QA’ing, and troubleshooting email generated from my app. Rails provides a couple of options to help during the development and test phases (setting action_mailer.delivery_method = :test), but there aren’t any great mechanisms for performing QA with a client or troubleshooting production email issues (formatting, content, etc).

Not long ago I stumbled upon Peter Boling’s plugin implementation of sanitize_email. I’ve since forked it, turned it into a gem, and continued to apply maintenance commits to it as rails has marched forward through versions 2.2 and 2.3.

The primary value sanitize_email provides is that it allows you to reroute all email without having to alter any application code. It’s environment-specific and doesn’t introduce any production/deployment dependencies.

Read the rest of this entry »

environmentalist 0.2.3 released — supports rails 2.3.2

April 4th, 2009 by

Just a heads up that I’ve released environmentalist 0.2.3. You can update with:


  sudo gem install environmentalist

The only substantial change in this release is that we moved the loading of postboot.rb to the bottom of the boot.rb file as opposed to the top of config/environment.rb. This was necessary because common db rake tasks like db:create and db:drop stopped loading the environment in 2.3.2.

As a recap, environmentalist provides an executable that converts a rails app’s config structure. The basic idea is that environments themselves are now first-class citizens, allowing you to create several environments (e.g. staging, prodtest, demo, etc.) in a clean, organized fashion. Each environment is given its own folder where it can store its own set of configuration files (think mongrel configs, apache configs, etc.) without polluting the top-level config/ directory.