has a great post to get you started with 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 »
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 running on with . 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
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 . 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 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.
Just a heads up that I’ve released 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.