<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss version="2.0">
  <channel>
    <title>RobertBousquet.com</title>
    <description>Technology &amp; Business at 5,840ft</description>
    <link>http://robertbousquet.com/articles.rss</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/robertbousquet" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="robertbousquet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Sandboxing Rails v2</title>
      <description>&lt;p&gt;(This article is a work in progress.  Still have a few things to test before I can fully recommend this version.)&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s been a while since I&amp;#8217;ve drastically changed the way that I manage my Rails stack.  Going back to 2005, MacPorts seemed to be the way to go.  Along the way, due to dependencies and the differing pace of each package there were times when my recipe didn&amp;#8217;t work or needed to be updated with specific portfile hacks or versions.  A lot has changed and in the last 5 years of Rails development and with Rails 3 right around the corner I figure it&amp;#8217;s time to give this stack another approach.&lt;/p&gt;
&lt;p&gt;One of the features of MacPorts is that it installs everything into /opt to isolate it from the Apple-provided development packages in /usr/bin.  This is a double-edged sword that does provide isolation, but at the cost of straying from the Linux-established recommendation to put user-installed files into /usr/local/bin.  This ends up requiring you to re-install many of the packages and libraries that Apple already provides and can cause some headache when the dependencies and packages don&amp;#8217;t find what they&amp;#8217;re looking for in your /usr or /usr/local areas.&lt;/p&gt;
&lt;p&gt;A recent development in the Rails world is Homebrew, which helps you to manage these core development packages by automating the compilation process for each package from source.  It adheres to the /usr/local namespace and at the same time, provides isolation of the packages through the clever use of symlinks to it&amp;#8217;s own /usr/local/Cellar folder where the executables actually live.  It does not provide any packages that Apple already provides (unless there&amp;#8217;s some major flaw in Apple&amp;#8217;s version) so that you don&amp;#8217;t have to choose between Apple-provided Subversion or your own, for instance.&lt;/p&gt;
&lt;p&gt;In any case, this is what I&amp;#8217;m thinking will be my next stack recipe for Rails 3 (while at the same time supporting dozens of Rails 2 and a few Rails 1 apps from the past):&lt;/p&gt;
&lt;p&gt;1. Install &lt;span class="caps"&gt;OSX&lt;/span&gt; Snow Leopard + X11 and XCode 2.3.2 (with optional iPhone 4SDK)&lt;br /&gt;
2. Install Homebrew (current method described on &lt;a href="http://github.com/mxcl/homebrew"&gt;http://github.com/mxcl/homebrew&lt;/a&gt;)&lt;/p&gt;
&lt;plain_text&gt;
&lt;p&gt;$ ruby -e &amp;#8220;$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)&amp;#8221;&lt;/p&gt;
&lt;/plain_text&gt;
&lt;p&gt;3. Install the brew-based packages we need:&lt;/p&gt;
&lt;plain_text&gt;
&lt;p&gt;$ brew install wget&lt;br /&gt;
$ brew install git&lt;br /&gt;
$ brew install mysql&lt;br /&gt;
$ brew install ghostscript&lt;br /&gt;
$ brew install imagemagick&lt;/p&gt;
&lt;/plain_text&gt;
&lt;p&gt;4. Install rvm to handle multiple ruby versions&lt;/p&gt;
&lt;plain_text&gt;
&lt;p&gt;$ sudo gem install rvm&lt;br /&gt;
$ rvm-install&lt;/p&gt;
&lt;/plain_text&gt;
&lt;p&gt;Then install each of the Ruby versions you need.  Since I have so many apps in the past, I&amp;#8217;m just going to install all of the recent versions.  If you are just getting started and only want to run Rails 3, then just do the last 1.9.2 version.&lt;/p&gt;
&lt;plain_text&gt;
&lt;p&gt;$ rvm install 1.8.6 &amp;#8212;default&lt;br /&gt;
$ rvm install 1.8.7&lt;br /&gt;
$ rvm install 1.9.1&lt;br /&gt;
$ rvm install 1.9.2&lt;/p&gt;
&lt;/plain_text&gt;
&lt;p&gt;5. Inside of each Ruby version, you&amp;#8217;re going to need to install all of your gems.  It&amp;#8217;s probably good to make a large list of them first, then run them in bulk.&lt;/p&gt;
&lt;plain_text&gt;
&lt;p&gt;$ rvm use 1.8.6&lt;br /&gt;
$ gem install rails&lt;/p&gt;
&lt;/plain_text&gt;
&lt;plain_text&gt;
&lt;p&gt;$ rvm use 1.9.2&lt;br /&gt;
$ gem install rails &amp;#8212;pre&lt;/p&gt;
&lt;/plain_text&gt;</description>
      <pubDate>Mon, 05 Jul 2010 00:48:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/9</link>
      <guid>http://robertbousquet.com/articles/9</guid>
    </item>
    <item>
      <title>Clearing Floats</title>
      <description>&lt;p&gt;In the past, you may have used a &lt;code&gt;&amp;lt;div style="clear:both"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; to force a container to clear it&amp;#8217;s floated contents.  This has worked pretty well for a couple years, but yesterday I stumbled across a better solution:  Simply remind the container div that it should be: &lt;code&gt;overflow: auto&lt;/code&gt; in your stylesheet and it&amp;#8217;ll do the right thing.&lt;/p&gt;</description>
      <pubDate>Wed, 19 May 2010 01:00:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/7</link>
      <guid>http://robertbousquet.com/articles/7</guid>
    </item>
    <item>
      <title>Password Protected Zip Files (OSX)</title>
      <description>&lt;p&gt;Password protected zip files cannot be opened within the &lt;span class="caps"&gt;OSX&lt;/span&gt; Finder, you&amp;#8217;ll just get an &amp;#8220;Operation Not Permitted&amp;#8221; error but you can use the command line utility &lt;code&gt;/usr/bin/unzip [filename]&lt;/code&gt;.  It&amp;#8217;ll prompt you for the password and then inflate the contents on success.&lt;/p&gt;</description>
      <pubDate>Sun, 16 May 2010 23:39:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/8</link>
      <guid>http://robertbousquet.com/articles/8</guid>
    </item>
    <item>
      <title>Disable ssh-agent in Snow Leopard</title>
      <description>&lt;p&gt;I use multiple ssh identities to connect to sites like github.  This allows me to create accounts for a group of people that should all have commit access to a particular account, but that isn&amp;#8217;t each person&amp;#8217;s primary account.  For instance, all of the developers at New Leaders have commit access to newleaders username so our clients can just give newleaders access to their repo and anyone on our team can then make changes if needed.  Follow &lt;a href="http://github.com/guides/multiple-github-accounts"&gt;this guide&lt;/a&gt; to setup multiple github accounts and keys.&lt;/p&gt;
&lt;p&gt;I ran into one problem on Snow Leopard which was that everytime I tried to authenticate to github using my non-primary account, it would send my primary ssh key first, and then authenticate me as bousquet instead of newleaders.  Turns out there is integration in Snow Leopard between your keychain and ssh through a process named ssh-agent.  Not sure what else it&amp;#8217;s needed for, but I turned mine off to fix the problem I described above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disable ssh-agent by unloading it from launchd:&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ launchctl unload /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;</description>
      <pubDate>Fri, 15 Jan 2010 03:27:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/6</link>
      <guid>http://robertbousquet.com/articles/6</guid>
    </item>
    <item>
      <title>Splitting large DMGs to fit on FAT32 Filesystem</title>
      <description>&lt;p&gt;I have a &lt;span class="caps"&gt;USB&lt;/span&gt; key where I store all of the installers and operating systems that I need to get setup on any machine.  Since I have &lt;span class="caps"&gt;OSX&lt;/span&gt;, Windows and Linux operating systems stored there and I won&amp;#8217;t always be using Mac hardware, I chose FAT32 despite its filesize limitations.  To workaround the 4gb limit on individual files I use the following command to split the larger dmg images of &lt;span class="caps"&gt;OSX&lt;/span&gt; install disks:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ hdiutil convert OSX.dmg -format UDRO -segmentSize 4000m -o OSX-split.dmg&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;</description>
      <pubDate>Sat, 03 Oct 2009 02:30:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/5</link>
      <guid>http://robertbousquet.com/articles/5</guid>
    </item>
    <item>
      <title>Sandboxing Rails</title>
      <description>&lt;p&gt;James Duncan Davidson wrote up a great recipe for installing Rails that I have been pointing people to for a couple years.  For some reason it&amp;#8217;s now missing from his site so here&amp;#8217;s my version of it from memory:&lt;/p&gt;
&lt;p&gt;1. Install Apple Developer Tools, available on your &lt;span class="caps"&gt;OSX&lt;/span&gt; &lt;span class="caps"&gt;DVD&lt;/span&gt; or as a free download from &lt;a href="http://developer.apple.com"&gt;http://developer.apple.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Install the &lt;a href="http://macports.org"&gt;Macports&lt;/a&gt; package manager for &lt;span class="caps"&gt;OSX&lt;/span&gt;.  It will manage the installation of all the libraries we need.&lt;/p&gt;
&lt;p&gt;3. Hide the &lt;code&gt;/opt&lt;/code&gt; directory from displaying in the &lt;span class="caps"&gt;OSX&lt;/span&gt; Finder gui&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo echo opt &amp;gt;&amp;gt; /.hidden&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;4. Install MySQL server via MacPorts.&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo port install mysql5 mysql5-server
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Configure &lt;code&gt;mysql5&lt;/code&gt; to start automatically at boot by running the following two commands:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
$ sudo -u mysql mysql_install_db5&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;5. Install Subversion.&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo port install subversion +tools
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;6. Install Ruby and related libraries.  Note: This is my recipe for the best Ruby 1.8.6 based Rails installation instead of the default Ruby 1.8.7.  If you just want the latest version of Ruby, then just skip to 6b.&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ cd /Users/Shared
$ curl -O http://newleaders.com/attachments/0000/0910/dports.tar.gz
$ tar xzf dports.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Edit &lt;code&gt;/opt/local/etc/macports/sources.conf&lt;/code&gt; and insert the &lt;code&gt;file:///...&lt;/code&gt; line before the default port repository line.  The last two lines of the file should say:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;file:///Users/Shared/dports
rsync://rsync.macports.org/release/ports/ [default]
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Run:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ portindex /Users/Shared/dports
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;7. Follow this series of commands to get Ruby and Rails installed.&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo port install ruby186
$ sudo port install rb-rubygems
$ sudo port install rb-mysql
$ sudo port install rb-termios
$ sudo port install rb-sqlite3
$ sudo gem install rails
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;8. Optional installs I recommend&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="text text_plain"&gt;&lt;span class="meta meta_paragraph meta_paragraph_text"&gt;$ sudo port install -u git-core +svn +bash_completion
$ sudo port install imagemagick +wmf +gs +tiff
$ sudo gem install rmagick
$ sudo gem install deprec
$ sudo gem install mongrel_cluster
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;That should give you a firm foundation to start your Rails applications.  This recipe has satisfied the needs of 90% of my applications.&lt;/p&gt;</description>
      <pubDate>Fri, 30 May 2008 16:13:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/4</link>
      <guid>http://robertbousquet.com/articles/4</guid>
    </item>
    <item>
      <title>Recommended Rails Plugins</title>
      <description>&lt;p&gt;I use these plugins in almost every project.  Here&amp;#8217;s the list:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/restful_authentication"&gt;restful_authentication&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
This is a basic restful authentication generator for rails, taken from acts as authenticated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/ssl_requirement"&gt;ssl_requirement&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class="caps"&gt;SSL&lt;/span&gt; requirement adds a declarative way of specifying that certain actions should only be allowed to run under &lt;span class="caps"&gt;SSL&lt;/span&gt;, and if they&amp;#8217;re accessed without it, they should be redirected.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/annotate_models"&gt;annotate_models&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Add a comment summarizing the current schema to the top of each ActiveRecord model source file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://github.com/caritos/action_mailer_tls/"&gt;action_mailer_tls&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Allows Rails to use GMail&amp;#8217;s secure &lt;span class="caps"&gt;SMTP&lt;/span&gt; server to send emails from ActionMailer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/will_paginate"&gt;will_paginate&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Easily paginate records, provides a great interface.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/permalink_fu"&gt;permalink_fu&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
This is a simple plugin extracted from Mephisto for creating permalinks from attributes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/file_column_plugin"&gt;file_column&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Makes handling of file uploads really easy and has a nice integration with rmagick. I&amp;#8217;ve been using this for a couple of years, it&amp;#8217;s solid.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://agilewebdevelopment.com/plugins/attachment_fu"&gt;attachment_fu&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
attachment_fu is a plugin by Rick Olson (aka technoweenie) and is the successor to acts_as_attachment. To get a basic run-through of its capabilities, check out &lt;a href="http://clarkware.com/cgi/blosxom/2007/02/24#FileUploadFu"&gt;Mike Clark&amp;#8217;s tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://svn.jamisbuck.org/rails-plugins/routing_tricks"&gt;routing_tricks&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
This is a collection of hacks and tricks that may or may not actually be useful. It is intended more as a tool for exploring (and teaching) the internals of Rails&amp;#8217; routing implementation.  Works great to specify subdomain or domain scopes for routes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/"&gt;exception_notification&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
The Exception Notifier plugin provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.activemerchant.org/"&gt;active_merchant&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Active Merchant is an extraction from the e-commerce system Shopify. Shopify&amp;#8217;s requirements for a simple and unified &lt;span class="caps"&gt;API&lt;/span&gt; to access dozens of different payment gateways with very different internal APIs was the chief principle in designing the library.&lt;/p&gt;</description>
      <pubDate>Thu, 22 May 2008 16:24:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/3</link>
      <guid>http://robertbousquet.com/articles/3</guid>
    </item>
    <item>
      <title>Using Gmail SMTP with ActionMailer</title>
      <description>&lt;p&gt;I am big fan of &lt;a href="http://google.com/a"&gt;Google Hosted Applications&lt;/a&gt; which provide free email accounts, calendars, and document storage for users of your custom domain.  I run at least 20 different domains in this manner (&lt;a href="http://robertbousquet.com"&gt;robertbousquet.com&lt;/a&gt;, &lt;a href="http://newleaders.com"&gt;newleaders.com&lt;/a&gt;, &lt;a href="http://paperflurrie.com"&gt;paperflurrie.com&lt;/a&gt;, etc.) with the my favorite feature being the email hosting.&lt;/p&gt;
&lt;p&gt;I also run about 30 rails applications across 10 servers or so and I often need to send email from my Rails applications for things like a friendly &amp;#8220;Thank your for signing up&amp;#8221; notice or &lt;a href="http://newleaders.com/discussions/39-recommended-plugins"&gt;Exception Notifications&lt;/a&gt; when something goes wrong.  Rather than fiddle with Postfix or sendmail on each of my servers, I use Google&amp;#8217;s &lt;span class="caps"&gt;SMTP&lt;/span&gt; servers (provided by the Google Hosted Applications account) to send mail.  This allows me to skip the confusing Postfix installation/configuration steps, and provides a higher likelihood that my emails will not get caught in spam filters.&lt;/p&gt;
&lt;p&gt;ActionMailer by default cannot securely connect to Google&amp;#8217;s secure &lt;span class="caps"&gt;SMTP&lt;/span&gt; servers, so you have to use the following recipe to enable secure &lt;span class="caps"&gt;SMTP&lt;/span&gt; connections for your Rails application:&lt;/p&gt;
&lt;p&gt;1) Download this  plugin into your &lt;code&gt;vendor/plugins&lt;/code&gt; directory:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://s3.amazonaws.com/robertbousquet/action_mailer_tls.zip"&gt;&lt;code&gt;action_mailer_tls&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2) Create a file called &lt;code&gt;config/initializers/smtp_gmail.rb&lt;/code&gt; and paste the following:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="source source_ruby source_ruby_rails"&gt;&lt;span class="meta meta_require meta_require_ruby"&gt;&lt;span class="keyword keyword_other keyword_other_special-method keyword_other_special-method_ruby"&gt;require&lt;/span&gt; &lt;span class="string string_quoted string_quoted_double string_quoted_double_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby"&gt;"&lt;/span&gt;smtp_tls&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
mailer_config &lt;span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby"&gt;=&lt;/span&gt; &lt;span class="support support_class support_class_ruby"&gt;File&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;.&lt;/span&gt;open&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby"&gt;(&lt;/span&gt;&lt;span class="string string_quoted string_quoted_double string_quoted_double_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby"&gt;"&lt;/span&gt;&lt;span class="source source_ruby source_ruby_embedded source_ruby_embedded_source"&gt;&lt;span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby"&gt;#{&lt;/span&gt;&lt;span class="variable variable_other variable_other_constant variable_other_constant_ruby"&gt;RAILS_ROOT&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_embedded punctuation_section_embedded_ruby"&gt;}&lt;/span&gt;&lt;/span&gt;/config/mailer.yml&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby"&gt;"&lt;/span&gt;&lt;/span&gt;&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby"&gt;)&lt;/span&gt;
mailer_options &lt;span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby"&gt;=&lt;/span&gt; &lt;span class="support support_class support_class_ruby"&gt;YAML&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;.&lt;/span&gt;load&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby"&gt;(&lt;/span&gt;mailer_config&lt;span class="punctuation punctuation_section punctuation_section_function punctuation_section_function_ruby"&gt;)&lt;/span&gt;
&lt;span class="support support_class support_class_ruby"&gt;ActionMailer&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby"&gt;::&lt;/span&gt;&lt;span class="support support_class support_class_ruby"&gt;Base&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;.&lt;/span&gt;smtp_settings &lt;span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby"&gt;=&lt;/span&gt; mailer_options&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;3) Create a &lt;code&gt;config/mailer.yml&lt;/code&gt; file with your Google Hosted Account credentials in it:&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="source source_yaml"&gt;&lt;span class="keyword keyword_operator keyword_operator_symbol"&gt;---&lt;/span&gt;
  :&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;address&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;smtp.gmail.com&lt;/span&gt;&lt;/span&gt;
  :&lt;span class="constant constant_numeric constant_numeric_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;port&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; 587&lt;/span&gt;
  :&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;user_name&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;john@doe.com &lt;/span&gt;&lt;/span&gt;
  :&lt;span class="string string_unquoted string_unquoted_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;password&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt;&lt;/span&gt; &lt;span class="string string_unquoted string_unquoted_yaml"&gt;s1j234gh&lt;/span&gt;&lt;/span&gt;
  :&lt;span class="meta meta_tag meta_tag_yaml"&gt;&lt;span class="entity entity_name entity_name_tag entity_name_tag_yaml"&gt;authentication&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_key-value punctuation_separator_key-value_yaml"&gt;:&lt;/span&gt; &lt;/span&gt;:plain&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;4) If you&amp;#8217;re using the &lt;code&gt;ExceptionNotification&lt;/code&gt; plugin, make sure the sender of the notifications matches your account email address or Google will not send it via &lt;span class="caps"&gt;SMTP&lt;/span&gt;&lt;/p&gt;
&lt;pre class="textmate-source twilight"&gt;&lt;span class="source source_ruby source_ruby_rails"&gt;&lt;span class="support support_class support_class_ruby"&gt;ExceptionNotifier&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;.&lt;/span&gt;exception_recipients &lt;span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby"&gt;=&lt;/span&gt; &lt;span class="string string_quoted string_quoted_other string_quoted_other_literal string_quoted_other_literal_lower string_quoted_other_literal_lower_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby"&gt;%w(&lt;/span&gt;devteam@doe.com&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby"&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class="support support_class support_class_ruby"&gt;ExceptionNotifier&lt;/span&gt;&lt;span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby"&gt;.&lt;/span&gt;sender_address &lt;span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby"&gt;=&lt;/span&gt; &lt;span class="string string_quoted string_quoted_other string_quoted_other_literal string_quoted_other_literal_upper string_quoted_other_literal_upper_ruby"&gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_begin punctuation_definition_string_begin_ruby"&gt;%(&lt;/span&gt;"John Doe" &amp;lt;john@doe.com&amp;gt;&lt;span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_end punctuation_definition_string_end_ruby"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;And that&amp;#8217;s pretty much it.  Make sure you enable &lt;span class="caps"&gt;POP&lt;/span&gt;/&lt;span class="caps"&gt;IMAP&lt;/span&gt; access in your Google Account so Rails can send mail via &lt;span class="caps"&gt;SMTP&lt;/span&gt;.  It should be noted that the Google&amp;#8217;s &lt;span class="caps"&gt;SMTP&lt;/span&gt; send limit is 500 emails per user per day.&lt;/p&gt;</description>
      <pubDate>Thu, 22 May 2008 15:45:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/2</link>
      <guid>http://robertbousquet.com/articles/2</guid>
    </item>
    <item>
      <title>Coming Soon</title>
      <description>&lt;p&gt;I will be moving my content here shortly.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Mar 2008 18:04:00 +0000</pubDate>
      <link>http://robertbousquet.com/articles/1</link>
      <guid>http://robertbousquet.com/articles/1</guid>
    </item>
  </channel>
</rss>
