<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Robby on Rails: Category Ruby on Rails</title>
    <link>http://www.robbyonrails.com/articles/category/ruby-on-rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <item>
      <title>Planet Argon is hiring</title>
      <description>&lt;p&gt;Hello all!&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been so busy this year travelling (for pleasure and work) and helping grow the company that I&amp;#8217;ve not had much to say here. Expect some posts soon!&lt;/p&gt;


	&lt;p&gt;In the meantime, if you&amp;#8217;re looking for a new challenge&amp;#8230; &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; is seeking a few more Ruby on Rails developers. Interested? &lt;a href="http://planetargon.com/careers"&gt;get in touch&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Mon, 22 Aug 2011 23:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8ed35c54-95b8-43a6-a3a5-171022db0e44</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2011/08/22/planet-argon-is-hiring</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>jobs</category>
      <category>rubyonrails</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>Announcing RailsDeveloper</title>
      <description>&lt;p&gt;Earlier today&amp;#8230; our team at &lt;a href="http://planetargon.com/"&gt;Planet Argon&lt;/a&gt; launched a new site for the Ruby on Rails community. If you have a few spare minutes, I&amp;#8217;d love it if you&amp;#8217;d to head over and &lt;a href="http://railsdeveloper.com/blog/2010/8/31/we-are-railsdeveloper"&gt;read the announcement&lt;/a&gt; on &lt;a href="http://railsdeveloper.com"&gt;RailsDeveloper&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
      <pubDate>Wed, 01 Sep 2010 12:01:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6fe475bc-a1c1-44b7-a195-df91d701d824</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2010/09/01/announcing-railsdeveloper</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>railsdeveloper</category>
      <category>rubyonrails</category>
      <category>rails</category>
    </item>
    <item>
      <title>Installing Ruby on Rails, Passenger, PostgreSQL, MySQL, Oh My Zsh on Snow Leopard, Fourth Edition</title>
      <description>&lt;p&gt;Welcome to what seems like my tenth installment (actually, it&amp;#8217;s the fourth) of showing you how I setup my development environment on a fresh &lt;span class="caps"&gt;OSX&lt;/span&gt; install. In this case, I&amp;#8217;m actually getting a MacBook setup for a new employee with Snow Leopard.&lt;/p&gt;


	&lt;p&gt;Over the years, I&amp;#8217;ve evolved these following steps and they&amp;#8217;ve helped our team maintain a consistent and stable envirnment for Ruby on Rails development. I know that there are a few other ways to approaching this and I&amp;#8217;m sure you&amp;#8217;ll get similar results, but this approach has allowed me to maintain a hassle-free setup for the last five years.&lt;/p&gt;


	&lt;p&gt;As with all things&amp;#8230; your milage may vary.&lt;/p&gt;


	&lt;h2&gt;Phase One&lt;/h2&gt;


	&lt;p&gt;During this initial phase, we&amp;#8217;re going to install the primary dependencies and setup our environment.&lt;/p&gt;


	&lt;h3&gt;XCode&lt;/h3&gt;


	&lt;p&gt;The first thing that you&amp;#8217;ll need to do is install XCode, which almost everything depends upon as this will install developer-friendly tools for you. Apple has been kind enough to ship this on your Snow Leopard &lt;span class="caps"&gt;DVD&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-kmamssde4apw1qxcs6u991p518.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Go ahead and install XCode from the &lt;strong&gt;Optional Installs&lt;/strong&gt; folder.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-1up5s7ahybmryrerrxxwn1d7tu.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;(might require a reboot)&lt;/p&gt;


	&lt;p&gt;You can also &lt;a href="http://developer.apple.com/technology/xcode.html"&gt;download it&lt;/a&gt; online.&lt;/p&gt;


	&lt;h3&gt;MacPorts&lt;/h3&gt;


	&lt;p&gt;Now we’ll install MacPorts, which the web site describes itself as, &amp;#8220;an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, &lt;span class="caps"&gt;X11&lt;/span&gt; or Aqua based open-source software on the Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; operating system.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;As I&amp;#8217;ve said in past versions of this guide, this tool is about to become one of the most important tools on your operating system. It&amp;#8217;ll be used time and time again to maintain your libraries and many of the Unix tools that you&amp;#8217;ll be using. If you&amp;#8217;re from the Linux or &lt;span class="caps"&gt;BSD&lt;/span&gt; world, you are likely familiar with similar tools… such as: &lt;code&gt;apt-get&lt;/code&gt;, &lt;code&gt;port&lt;/code&gt;, and &lt;code&gt;yum&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;You&amp;#8217;ll want to download the latest stable version from &lt;a href="http://www.macports.org"&gt;http://www.macports.org/&lt;/a&gt;. Once downloaded, you can install it.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-fd4h7rd16437yd63hf45mkn592.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Once this is installed, you&amp;#8217;ll be able to use the &lt;code&gt;port&lt;/code&gt; command from your console.&lt;/p&gt;


	&lt;h3&gt;Wget&lt;/h3&gt;


	&lt;p&gt;Let&amp;#8217;s test out your MacPorts install by installing a useful tool called wget, which we&amp;#8217;ll use to install oh-my-zsh.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install wget&lt;/code&gt;&lt;/p&gt;


	&lt;h3&gt;Git and Subversion&lt;/h3&gt;


	&lt;p&gt;Every development environment should have some source code management tools available. We&amp;#8217;ll install both of these with one command.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install git-core +svn&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;This will install git and subversion.&lt;/p&gt;


	&lt;h3&gt;oh-my-zsh&lt;/h3&gt;


	&lt;p&gt;&lt;a href="http://github.com/robbyrussell/oh-my-zsh"&gt;Oh My Zsh&lt;/a&gt; is the most amazing thing to happen to shells since&amp;#8230; well since I said so. It&amp;#8217;s one of my open source projects that I encourage you to give a whirl.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s it. The next time you open up your terminal, you&amp;#8217;ll be running zsh with a bunch of stuff available. For more information, visit &lt;a href="http://github.com/robbyrussell/oh-my-zsh"&gt;http://github.com/robbyrussell/oh-my-zsh&lt;/a&gt;.&lt;/p&gt;


	&lt;h3&gt;Terminal theme (optional)&lt;/h3&gt;


	&lt;p&gt;I never understood why the icon for Terminal has a black background but when you start it up the default theme is black on white.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-1b92cbx8gtuttqsbdd49qspq7f.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;versus&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-8dnmpswyumfk73h942g6u4fih4.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Anyhow, I&amp;#8217;m a fan of the the dark background. To change this, open up preferences in Terminal. Select &lt;strong&gt;Pro&lt;/strong&gt;, then click on the &lt;strong&gt;Default&lt;/strong&gt; window so that this sticks around.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-mr4q4y5btq7sscuh7ceky3ahgx.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s now open up a new Terminal window..&lt;/p&gt;


	&lt;p&gt;You should be looking at something like this:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-psmj7mqsx38j1i2nj75n6hbcg7.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Much better&amp;#8230; let&amp;#8217;s continue.&lt;/p&gt;


	&lt;h2&gt;Phase Two&lt;/h2&gt;


	&lt;p&gt;We&amp;#8217;re now going to start installing everything we need to get this running.&lt;/p&gt;


	&lt;h3&gt;Ruby 1.8.7.x&lt;/h3&gt;


	&lt;p&gt;First up, Ruby.&lt;/p&gt;


	&lt;p&gt;Snow Leopard includes Ruby and Rails already installed, but we&amp;#8217;re going to back these up for a rainy day. Just issue these  commands:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo su -
Password:
:~ root# mv /usr/bin/ruby /usr/bin/ruby.orig
:~ root# mv /usr/bin/gem /usr/bin/gem.orig
:~ root# mv /usr/bin/rails /usr/bin/rails.orig
:~ root# logout
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-b7cxbt8andg3t7ntn17r1wahfg.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Now we&amp;#8217;ll go ahead and install a fresh copy of Ruby and RubyGems via MacPorts.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install ruby rb-rubygems&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;You should now see something like this for a bit&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-n9xxiaqbe6bw72qr88dgurxqdp.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s watch a video about bumble bees.&lt;/p&gt;


&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/R-o6e57AEGo&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/R-o6e57AEGo&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;When it finishes installing, you should check that Ruby is available to you and installed in &lt;code&gt;/opt/local/bin&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-tfc3ifeaau15295r9sfmfhbnm1.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ll also take a second to create a symlink for this as some tools seem to rely on &lt;code&gt;/usr/bin/ruby&lt;/code&gt; being there.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo ln -s /opt/local/bin/ruby /usr/bin/ruby&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Great, let&amp;#8217;s move on.&lt;/p&gt;


	&lt;h3&gt;Passenger (mod_rails)&lt;/h3&gt;


	&lt;p&gt;Now that we have Ruby installed, we&amp;#8217;re going to take a quick detour to setup Passenger with the Apache server already available on your machine. I&amp;#8217;ve been a big fan of using Passenger for your development for over a year now.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo gem install passenger&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Once the gem is finished installing, you&amp;#8217;ll need to install the apache2 module with the following command:&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;ll ask you to continue by pressing Enter. At this point, it&amp;#8217;ll check that you have all the necessary dependencies and then compile everything needed for Apache2.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-x4rcmr6m5q44etk7rad2kqpmir.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Now I&amp;#8217;ll force you to watch a highlights reel of Fernando Torres&amp;#8230; &lt;em&gt;the best striker in the world!&lt;/em&gt;&lt;/p&gt;


&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/jRtq6TtSxbE&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/jRtq6TtSxbE&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;The passenger install will then show you this output, which you&amp;#8217;ll want to stop and read for a moment and highlight the following:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-ms13ub2srx2axk6ti43ifiyut4.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Then using vi or emacs, you&amp;#8217;ll want to create a new file with the following content:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;vi /etc/apache2/other/passenger.conf&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Then paste in the following (what you highlighted and copied above.)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.9
PassengerRuby /opt/local/bin/ruby
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You&amp;#8217;ll also want to include the following below what you just pasted.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  # Set the default environment to development
  RailsEnv development

  # Which directory do you want Apache to be able to look into for projects?
  &amp;lt;Directory "/Users/ryangensel/development"&amp;gt;
      Order allow,deny
      Allow from all
  &amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You&amp;#8217;ll want to quickly start up your web sharing, which will start Apache2 up via your System Preferences.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-ekr2g6f5seb6iif35fteyjfi74.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-rm96gmde4d8ffwjbdyqusiqr8f.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Simple enough&amp;#8230; moving forward.&lt;/p&gt;


	&lt;h3&gt;Passenger Pref Pane&lt;/h3&gt;


	&lt;p&gt;To make things as simple as possible, I&amp;#8217;d encourage you to install the &lt;a href="http://www.fngtps.com/2009/09/new-os-more-pane-passenger-preference-pane-v1-3"&gt;Passenger Preference Pane&lt;/a&gt; (view this post for a download).&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-ra8p88abxtnxbq3m9711gbpryb.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;h3&gt;Development directory&lt;/h3&gt;


	&lt;p&gt;I have a directory named &lt;code&gt;development/&lt;/code&gt; in my home directory, which is where I end up storing all of my projects. This should match whatever you put above in the apache configuration (&lt;code&gt;&amp;lt;Directory "/Users/ryangensel/development"&amp;gt;&lt;/code&gt;).&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;mkdir development; cd development;&lt;/code&gt;&lt;/p&gt;


	&lt;h3&gt;Installing Ruby on Rails via RubyGems&lt;/h3&gt;


	&lt;p&gt;Now we&amp;#8217;ll use RubyGems to install the latest version of Ruby on Rails (and all of it&amp;#8217;s dependencies).&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo gem install rails&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-eyhg4t9sscbeiccs5rxkb5p35.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;While this is installing, you can watch a video from my old band that ended around the time that business started picking up for &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt;.&lt;/p&gt;


&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/SJvncb3bVdg&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/SJvncb3bVdg&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;color1=0x5d1719&amp;#38;color2=0xcd311b" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;Great, let&amp;#8217;s test out the install of Rails&amp;#8230;&lt;/p&gt;


	&lt;h3&gt;Test Rails and Passenger&lt;/h3&gt;


	&lt;p&gt;In your development directory, let&amp;#8217;s quickly a new Rails app&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;rails testapp&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;This will generate a new Rails application in a &lt;code&gt;testapp/&lt;/code&gt; directory.&lt;/p&gt;


	&lt;p&gt;Now open up the &lt;strong&gt;Passenger Preferences Pane&lt;/strong&gt; and add this directory as a new application.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-83rjan794eqcmy62e1u4aujtiy.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-tms89ssutthhq8rkpjm392qfpb.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Press Apply&amp;#8230;&lt;/p&gt;


	&lt;p&gt;You should now fire up your browser of choice and head to &lt;code&gt;http://testapp.local&lt;/code&gt;. If all has worked, you&amp;#8217;ll see a, &amp;#8220;Welcome aboard&amp;#8221; screen from the Ruby on Rails application.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-c9phjdfq8ybcu29uc5k9qiuha9.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Assuming that this worked for you, let&amp;#8217;s take a quick break to make some tea&amp;#8230;&lt;/p&gt;


	&lt;h2&gt;Phase Three&lt;/h2&gt;


	&lt;p&gt;In this last phase, we&amp;#8217;re going to install a few database servers and corresponding rubygems so that you can get to work.&lt;/p&gt;


	&lt;h3&gt;PostgreSQL&lt;/h3&gt;


	&lt;p&gt;At &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt;, we build our web applications on top of &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt;. I&amp;#8217;ve been a long-time advocate of it and hope you consider using it yourself.&lt;/p&gt;


	&lt;p&gt;At this point in time, the current stable version of PostgreSQL via MacPorts is 8.4.x. Let&amp;#8217;s install that now&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install postgresql84 postgresql84-server&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Once this finishes compiling, you&amp;#8217;ll need to run the following commands to setup a new PostgreSQL database.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb
sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb
sudo su postgres -c '/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb'
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Assuming that you want PostgreSQL to always be running, you can run:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;...and to start it right now, run:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo launchctl start org.macports.postgresql84-server&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Before you can start using it, we&amp;#8217;ll need to make sure that the PostgreSQL executables are available in your shell path. Since you&amp;#8217;re now using &lt;a href="http://github.com/robbyrussell/oh-my-zsh"&gt;oh-my-zsh&lt;/a&gt;, you&amp;#8217;ll want to edit &lt;code&gt;~/.zshrc&lt;/code&gt; with your favorite editor.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;vi ~/.zshrc&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Just append this to &lt;code&gt;export PATH=&lt;/code&gt; line in the file.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;:/opt/local/lib/postgresql84/bin&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Your &lt;span class="caps"&gt;PATH&lt;/span&gt; might look something like the following now:&lt;/p&gt;


	&lt;p&gt;@# Customize to your needs&amp;#8230;
export &lt;span class="caps"&gt;PATH&lt;/span&gt;=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/lib/postgresql84/bin@&lt;/p&gt;


	&lt;h4&gt;Setup database user&lt;/h4&gt;


	&lt;p&gt;To setup a new database (with superuser credentials), just run:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;createuser --superuser ryangensel -U postgres&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ll now test creating a database:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;createdb test_db&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s test that we can access it&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
➜  ~  psql test_db
psql (8.4.2)
Type "help" for help.

test_db=# \q
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, let&amp;#8217;s drop it now.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
➜  ~  dropdb test_db
➜  ~  psql test_db
psql: FATAL:  database "test_db" does not exist
➜  ~
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Okay, we&amp;#8217;ll now install the library that will allow Ruby to talk to PostgreSQL.&lt;/p&gt;


	&lt;p&gt;Just run: &lt;code&gt;sudo gem install pg&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-b4cf1pm1utkf2ihd9up432etwm.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Voila&amp;#8230; let&amp;#8217;s move on to the inferior database&amp;#8230;&lt;/p&gt;


	&lt;h3&gt;MySQL&lt;/h3&gt;


	&lt;p&gt;We&amp;#8217;re going to run through the installation of MySQL really quickly because you might need it.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install mysql5 mysql5-server&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;This took ages on my machine&amp;#8230; so let&amp;#8217;s watch a video.&lt;/p&gt;


&lt;object width="560" height="340"&gt;&lt;param name="movie" value="http://www.youtube.com/v/LOZIjWJpiBk&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/LOZIjWJpiBk&amp;#38;hl=en_US&amp;#38;fs=1&amp;#38;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;We&amp;#8217;ll now setup the database and make sure it starts on system boot.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
 sudo -u _mysql mysql_install_db5
 sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
 sudo launchctl start org.macports.mysql5
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Let&amp;#8217;s test that we can create a database now (and that it&amp;#8217;s running.)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
 ➜  ~  mysql5 -u root
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 3
 Server version: 5.1.43 Source distribution

 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 mysql&amp;gt; create database test1;
 Query OK, 1 row affected (0.00 sec)

 mysql&amp;gt; \q
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, we&amp;#8217;ll now install the library that will allow Ruby to talk to MySQL.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo gem install mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;That should be it!&lt;/p&gt;


	&lt;h3&gt;Phase Four, next steps&lt;/h3&gt;


	&lt;p&gt;Okay&amp;#8230; so we&amp;#8217;ve installed XCode, MacPorts, Ruby, Rails, PostgreSQL, MySQL&amp;#8230; and I&amp;#8217;ve also got you to switch your default terminal shell from bash to zsh. You might take a look over the &lt;a href="http://wiki.github.com/robbyrussell/oh-my-zsh/themes"&gt;available themes for Oh My Zsh&lt;/a&gt; so that you can personalize your terminal experience even further.&lt;/p&gt;


	&lt;p&gt;You also now have a handful of gems installed as you can see with &lt;code&gt;gem list&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://img.skitch.com/20100208-p2kkjnng2b2kebeenkwkihn2p5.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;h3&gt;Closing thoughts&amp;#8230;&lt;/h3&gt;


	&lt;p&gt;This is the fourth version of this guide and I&amp;#8217;ve appreciated the hundreds of comments, questions, and emails that I have received&amp;#8230; let&amp;#8217;s not forget all those beers that people buy me when I&amp;#8217;m at conferences. :-)&lt;/p&gt;


	&lt;p&gt;I hope you have found some of this useful. If you have any problems and/or questions, don&amp;#8217;t hesitate to post them in the comments section below.&lt;/p&gt;
</description>
      <pubDate>Mon, 08 Feb 2010 13:14:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:2387d63c-c145-4f7e-ad77-e3aa9aabacef</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>rubyonrails</category>
      <category>github</category>
      <category>ohmyzsh</category>
      <category>zsh</category>
      <category>postgresql</category>
      <category>mysql</category>
      <category>rails</category>
      <category>ruby</category>
      <category>xcode</category>
      <category>snowleopard</category>
      <category>osx</category>
      <category>guide</category>
    </item>
    <item>
      <title>RubyURL goes GOP...</title>
      <description>&lt;p&gt;Will refrain from any political commentary, but was notified by some friends that the &lt;span class="caps"&gt;GOP&lt;/span&gt; was using the &lt;a href=":http://github.com/robbyrussell/rubyurl"&gt;source code&lt;/a&gt; for &lt;a href="http://rubyurl.com"&gt;RubyURL&lt;/a&gt; for their new &lt;span class="caps"&gt;URL&lt;/span&gt; shortening site (&lt;a href="http://gop.am"&gt;gop.am&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;To celebrate, I decided to daisy chain a few rubyurl-based sites together and came up with:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://rubyurl.com/hj6l"&gt;http://rubyurl.com/hj6l&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;


	&lt;p&gt;As always, you can &lt;a href="http://github.com/robbyrussell/rubyurl"&gt;fork/clone here&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Wed, 16 Dec 2009 23:08:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:90336b56-d75c-4c7f-8173-b64b3220e16f</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/12/16/rubyurl-goes-gop</link>
      <category>RubyURL</category>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>rubyurl</category>
      <category>gop</category>
      <category>zombieurl</category>
    </item>
    <item>
      <title>Sending email: Controllers versus Models</title>
      <description>&lt;p&gt;While reviewing some code recently, I came across controller code that resembled the following.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="attribute"&gt;@customer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;save&lt;/span&gt;
  &lt;span class="constant"&gt;CustomerMailer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;deliver_welcome_message&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@customer&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;flash&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:message&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Your account has been successfully created. We've sent you a welcome letter with...&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
  &lt;span class="ident"&gt;redirect_to&lt;/span&gt; &lt;span class="ident"&gt;dashboard_path&lt;/span&gt;
&lt;span class="keyword"&gt;else&lt;/span&gt;
  &lt;span class="punct"&gt;...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Fairly typical Rails code. Nothing alarming here, but I wanted to evaluate the call to the mailer in this scenario. When it comes to sending emails from your application, you can choose to do it from the controller as in the example above or in your models. Our team prefers to do this from our model via a callback as we are considering this to be part of our business logic.&lt;/p&gt;


	&lt;p&gt;Each time a customer is created, we want to send them an email. This can be moved into the model and resembled something like the following..&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;after_create&lt;/span&gt; &lt;span class="symbol"&gt;:send_welcome_message&lt;/span&gt; &lt;span class="comment"&gt;#, other callbacks..&lt;/span&gt;

&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;send_welcome_message&lt;/span&gt;
  &lt;span class="constant"&gt;CustomerMailer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;deliver_welcome_message&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;There are a few benefits to doing it this way.&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;We can test that this is being triggered within our model specs instead of our controller specs. (we prefer to spend more of our time working within models than controllers)&lt;/li&gt;
		&lt;li&gt;We remove the dependency that all requests must be processed through our controllers.
	&lt;ul&gt;
	&lt;li&gt;Example: We may one day create rake tasks that data and want these emails to still be sent out. (We&amp;#8217;ve had to do this a few times)&lt;/li&gt;
	&lt;/ol&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I definitely don&amp;#8217;t think doing this via controllers is a bad idea, I just lean towards keeping controllers as dumbed down as possible. This allows us to have less controller code that is focused on passing data to/from models and letting our models do the heavy lifting.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; DHH was kind enough to &lt;a href="http://www.loudthinking.com/posts/43-think-of-emails-as-views-delivered-through-smtp"&gt;post a more detailed response&lt;/a&gt; on his blog.&lt;/p&gt;
</description>
      <pubDate>Mon, 16 Nov 2009 09:33:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d6851ac5-ee56-40a0-844e-2ac06dea641f</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/11/16/sending-email-controllers-versus-models</link>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>development</category>
      <category>rubyonrails</category>
      <category>actionmailer</category>
      <category>models</category>
      <category>controllers</category>
      <category>patterns</category>
    </item>
    <item>
      <title>Launching Ruby on Rails projects, the video</title>
      <description>&lt;p&gt;For those of you who didn&amp;#8217;t make it to &lt;a href="http://www.rails-underground.com/"&gt;Rails Underground&lt;/a&gt; in July to witness my &lt;em&gt;mind-blowing&lt;/em&gt; talk, &lt;a href="http://www.slideshare.net/robbyrussell/launching-ruby-on-rails-projects-a-checklist"&gt;Launching Ruby on Rails projects&lt;/a&gt; , it appears that Skills Matter has finally &lt;a href="http://skillsmatter.com/podcast/ajax-ria/robby-russell-launching-ruby-on-rails-projects"&gt;posted a video&lt;/a&gt; of it online. :-)&lt;/p&gt;


	&lt;p&gt;The sound levels are really low&amp;#8230; but hopefully you&amp;#8217;ll find it helpful.&lt;/p&gt;


	&lt;p&gt;You can also &lt;a href="http://www.slideshare.net/robbyrussell/launching-ruby-on-rails-projects-a-checklist"&gt;view the slides&lt;/a&gt;.&lt;/p&gt;


	&lt;h3&gt;Related Posts&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2008/12/14/launching-ruby-on-rails-projects-a-checklist"&gt;Launching Ruby on Rails projects, a checklist&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Wed, 11 Nov 2009 12:00:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ee480bcd-b905-418a-8487-34597633a4cc</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/11/11/launching-ruby-on-rails-projects-the-video</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>projects</category>
      <category>agile</category>
      <category>development</category>
      <category>clients</category>
      <category>presentation</category>
      <category>conference</category>
      <category>rubyonrails</category>
      <category>video</category>
    </item>
    <item>
      <title>Tracking Google Analytics events in development environment with GoogleAnalyticsProxy</title>
      <description>&lt;p&gt;As mentioned in a recent article&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;, I&amp;#8217;ve been diving deep into &lt;a href="http://www.google.com/analytics/"&gt;Google Analytics&lt;/a&gt; lately while working on a few client projects. We&amp;#8217;re aiming to use much more of the features of Google Analytics and have been hitting some roadblocks with the development versus production application environments. Once you begin to dive into event tracking and &lt;span class="caps"&gt;AJAX&lt;/span&gt;-driven goal conversions, relying on just the sample code that Google Analytics provides you is going to result in you looking at a handful of JavaScript errors.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/nfu1f/pagetracker-is-not-defined"&gt;&lt;img src="http://img.skitch.com/20091101-c62euttfs5ejejt2eqpfxpnfau.preview.jpg" alt="pageTracker is not defined" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;another example from the firebug javascript console&amp;#8230;&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/nfu1g/firebug-pagetracker-is-not-defined"&gt;&lt;img src="http://img.skitch.com/20091101-p5mb21ufih99n3sa6uafsc4gyf.preview.jpg" alt="firebug pageTracker is not defined" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;We see JavaScript errors like this because we don&amp;#8217;t load the google analytics code in our development environments. As you can see, we are only loading this in our production environment.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="punct"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="constant"&gt;RAILS_ENV&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;production&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;-%&amp;gt;&lt;/span&gt;&lt;span class="string"&gt;
    &amp;lt;!--// Google Analytics //--&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;script&lt;/span&gt; &lt;span class="ident"&gt;type&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;text/javascript&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;
    &lt;span class="ident"&gt;var&lt;/span&gt; &lt;span class="ident"&gt;gaJsHost&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;((&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;https:&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;location&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;protocol&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;https://ssl.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://www.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;);&lt;/span&gt;
    &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;write&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;unescape&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;%3Cscript src='&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="ident"&gt;gaJsHost&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;));&lt;/span&gt;
    &lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="regex"&gt;script&amp;gt;
    &amp;lt;script type=&amp;quot;text&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;javascript&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;gt;
    var pageTracker = _gat._getTracker(&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="constant"&gt;UA&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="constant"&gt;XXXXXX&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;);
    pageTracker._trackPageview();
    &amp;lt;/script&amp;gt;
  &amp;lt;% end -%&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;To &lt;a href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApiEventTracking.html#_gat.GA_EventTracker_._trackEvent"&gt;track an event with Google Analytics&lt;/a&gt;, you&amp;#8217;d need to trigger something like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;pageTracker&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;_trackEvent&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Button&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Click&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Get in touch&lt;/span&gt;&lt;span class="punct"&gt;');&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;As you can see from our code earlier, in development, the &lt;code&gt;pageTracker&lt;/code&gt; variable isn&amp;#8217;t defined and that&amp;#8217;s why we&amp;#8217;re getting those JS errors. We also don&amp;#8217;t want to add conditionals everywhere in our application to check if we&amp;#8217;re in development or production environment.. as that&amp;#8217;d just make our views uglier than they need to be. So, I decided that I&amp;#8217;d create a proxy class in JavaScript that would allow us to trigger &lt;code&gt;_trackEvent()&lt;/code&gt; and &lt;code&gt;_trackPageview()&lt;/code&gt; and handle it appropriately.&lt;/p&gt;


	&lt;p&gt;This class works with the following logic:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;if google analytics &lt;strong&gt;is&lt;/strong&gt; loaded, pass the parameters to the real &lt;code&gt;pageTracker&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;if google analytics &lt;strong&gt;is &lt;span class="caps"&gt;NOT&lt;/span&gt;&lt;/strong&gt; loaded, output the information to &lt;code&gt;console.log()&lt;/code&gt; for debugging purposes&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;For example, on a gallery on our web site&amp;#8230; we track when people navigate next and/or previous through the photos. In our development environment, I can watch the JavaScript console output the following:&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/nfu19/firebug-gap"&gt;&lt;img src="http://img.skitch.com/20091101-jwbyprqyaj68hxtjw8bbg6mccm.preview.jpg" alt="Firebug - GAP" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;And in our production environment, we can see that this was sent to Google Analytics.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/nfuut/firebug-trackevent"&gt;&lt;img src="http://img.skitch.com/20091101-q9dkn8tw3kyndxr55fqed6k8fq.preview.jpg" alt="Firebug - trackEvent()" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;We&amp;#8217;re able to do this by initializing the GoogleAnalyticsProxy class and calling these functions through it. For example:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;_gap&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;new&lt;/span&gt; &lt;span class="constant"&gt;GoogleAnalyticsProxy&lt;/span&gt;&lt;span class="punct"&gt;();&lt;/span&gt;
  &lt;span class="ident"&gt;_gap&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;_trackEvent&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Video&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Play&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Homepage video&lt;/span&gt;&lt;span class="punct"&gt;');&lt;/span&gt;
  &lt;span class="ident"&gt;_gap&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;_trackEvent&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Video&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Pause&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Homepage video&lt;/span&gt;&lt;span class="punct"&gt;');&lt;/span&gt;
  &lt;span class="ident"&gt;_gap&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;_trackEvent&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Button&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Click&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Call to action X&lt;/span&gt;&lt;span class="punct"&gt;');&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You&amp;#8217;ll see that we&amp;#8217;re just calling &lt;code&gt;_gap&lt;/code&gt; versus &lt;code&gt;pageTracker&lt;/code&gt;. We then replace all the instances of pageTracker (except where it is defined in the google analytics code block they provide you). You&amp;#8217;ll find this located near the bottom of our &lt;code&gt;application.html.erb&lt;/code&gt; file.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="punct"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="constant"&gt;RAILS_ENV&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;production&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;-%&amp;gt;&lt;/span&gt;&lt;span class="string"&gt;
  &amp;lt;!--// Google Analytics //--&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="ident"&gt;script&lt;/span&gt; &lt;span class="ident"&gt;type&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;text/javascript&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;
  &lt;span class="ident"&gt;var&lt;/span&gt; &lt;span class="ident"&gt;gaJsHost&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;((&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;https:&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;location&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;protocol&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;https://ssl.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://www.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;);&lt;/span&gt;
  &lt;span class="ident"&gt;document&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;write&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;unescape&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;%3Cscript src='&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="ident"&gt;gaJsHost&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;));&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="regex"&gt;script&amp;gt;
  &amp;lt;script type=&amp;quot;text&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;javascript&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;gt;
  var pageTracker = _gat._getTracker(&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="constant"&gt;UA&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="constant"&gt;XXXXXX&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;);
  pageTracker._trackPageview();
  &amp;lt;/script&amp;gt;
&amp;lt;% end -%&amp;gt;

&amp;lt;script type=&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="ident"&gt;text&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;javascript&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&amp;gt;
  var _gap = new GoogleAnalyticsProxy();
&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We now have &lt;code&gt;_gap&lt;/code&gt; available throughout our project and can call &lt;code&gt;_trackEvent()&lt;/code&gt; and &lt;code&gt;_trackPageview()&lt;/code&gt; with it. Note: You can use any JS variable name that you want, _gap is just what I went with.&lt;/p&gt;


	&lt;h2&gt;Get GoogleAnalyticsProxy&lt;/h2&gt;


	&lt;p&gt;I&amp;#8217;ve gone ahead and tossed this small JavaScript class (known as &lt;a href="http://github.com/robbyrussell/GoogleAnalyticsProxy"&gt;GoogleAnalyticsProxy&lt;/a&gt;) on Github for your enjoyment. I have some more articles in the works that will show you some tips for how to make the most of Google Analytics. If you have any questions and/or ideas for related article topics, don&amp;#8217;t hesitate to let me know.&lt;/p&gt;


	&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;a href="http://www.robbyonrails.com/articles/2009/10/21/tracking-ajax-driven-events-in-ruby-on-rails-for-google-analytics-conversion-goals"&gt;Tracking &lt;span class="caps"&gt;AJAX&lt;/span&gt;-driven events in Ruby on Rails for Google Analytics conversion goals&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Sun, 01 Nov 2009 13:55:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e2bd1653-794b-473a-89ed-a89a58eb0706</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/11/01/googleanalyticsproxy-for-development-environment-tracking-events-in-google-analytics</link>
      <category>Ruby on Rails</category>
      <category>PostgreSQL</category>
      <category>javascript</category>
      <category>analytics</category>
      <category>kpi</category>
      <category>googleanalytics</category>
      <category>events</category>
      <category>proxy</category>
      <category>opensource</category>
      <category>github</category>
      <category>prototype</category>
    </item>
    <item>
      <title>Planet Argon Podcast, Episode 2: The Letter Scotch</title>
      <description>&lt;p&gt;Earlier this week our &lt;a href="http://planetargon.com/podcast"&gt;new podcast&lt;/a&gt; was approved and is &lt;a href="http://planetargon.com/news/2009/10/26/podcast-now-available-in-apple-itunes-store"&gt;now available in the Apple iTunes Store&lt;/a&gt;. We&amp;#8217;re also &lt;a href="http://heybrainstormr.com/t/5DW1"&gt;soliciting topic ideas for future episodes&lt;/a&gt; on &lt;a href="http://planetargon.com/projects/brainstormr"&gt;brainstormr&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;We posted Episode 2, The Letter Scotch, yesterday for your enjoyment. In this episode, we covered a handful of web browser tools that we use (and detest) to debug &lt;span class="caps"&gt;HTML&lt;/span&gt;, CSS, and JavaScript. This included Web Inspector, Firebug, DebugBar, and a handful of other tools. We all have slightly different preferences, depending on the tasks that we&amp;#8217;re working on and the team had an open dialogue about the pros/cons of each of these tools.&lt;/p&gt;


	&lt;p&gt;You can learn more about and listen to our podcast at &lt;a href="http://planetargon.com/podcast"&gt;http://planetargon.com/podcast&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Thanks in advance for listening!&lt;/p&gt;
</description>
      <pubDate>Fri, 30 Oct 2009 08:27:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b468dea2-2eda-48d1-a56e-d56f27c30d55</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/30/planet-argon-podcast-episode-2-the-letter-scotch</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>planetargon</category>
      <category>rubyonrails</category>
      <category>agile</category>
      <category>podcast</category>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
      <category>firefox</category>
      <category>firebug</category>
      <category>safari</category>
      <category>debugbar</category>
      <category>internetexplorer</category>
      <category>webbrowsers</category>
      <category>webinspector</category>
      <category>itunes</category>
    </item>
    <item>
      <title>Planet Argon Podcast, Episode 1: Shin Splints</title>
      <description>&lt;p&gt;We&amp;#8217;re currently waiting to get our new podcast approved by Apple, but have uploaded episode 1 to tumblr in the meantime.&lt;/p&gt;


&lt;embed type="application/x-shockwave-flash" src="http://planetargon.tumblr.com/swf/audio_player_black.swf?audio_file=http://www.tumblr.com/audio_file/220369476/tumblr_krxusucVgn1qz5fkl&amp;amp;color=FFFFFF" height="27" width="207" quality="best"&gt;

	&lt;p&gt;In this short episode, we cover the following topics:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/binarylogic/authlogic"&gt;Authlogic&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://github.com/notahat/machinist/"&gt;Machinist&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://github.com/robbyrussell/faker"&gt;Faker&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://lesscss.org/"&gt;&lt;span class="caps"&gt;LESS&lt;/span&gt;&lt;/a&gt; (for &lt;span class="caps"&gt;CSS&lt;/span&gt;)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://textorize.org/"&gt;Textorize&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://planetargon.com/what-we-do/development/rails-code-audit"&gt;The 8-Hour Rails Code Audits&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We&amp;#8217;re planning to keep this short and focused to a few topics. Once it&amp;#8217;s posted on iTunes, we&amp;#8217;ll let you know.&lt;/p&gt;


	&lt;p&gt;Please consider &lt;a href="http://feeds.feedburner.com/PlanetArgonPodcast"&gt;subscribing to the podcast&lt;/a&gt;. Enjoy!&lt;/p&gt;
</description>
      <pubDate>Thu, 22 Oct 2009 18:50:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b2051962-5ab1-4b11-880d-3a9c3155140b</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/22/planet-argon-podcast-episode-1-shin-splints</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>podcast</category>
      <category>authlogic</category>
      <category>gems</category>
      <category>machinist</category>
      <category>faker</category>
      <category>less</category>
      <category>css</category>
      <category>textorize</category>
    </item>
    <item>
      <title>RailsOnPg released</title>
      <description>&lt;p&gt;Hello fellow &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt; and &lt;a href="http://rubyonrails.org/"&gt;Ruby on Rails&lt;/a&gt; geeks,&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://github.com/alex3t"&gt;Alexander Tretyakov&lt;/a&gt; (&lt;a href="http://twitter.com/redvok"&gt;twitter&lt;/a&gt;) recently released a plugin for Ruby on Rails, which extends migrations and provides you with the ability to create.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Functions (&lt;a href="http://developer.postgresql.org/pgdocs/postgres/sql-createtrigger.html"&gt;pg docs&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;Triggers (&lt;a href="http://developer.postgresql.org/pgdocs/postgres/sql-createfunction.html"&gt;pg docs&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;Views (&lt;a href="http://developer.postgresql.org/pgdocs/postgres/sql-createview.html"&gt;pg docs&lt;/a&gt;)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;While you can already do something like this with &lt;code&gt;execute&lt;/code&gt; in your migrations:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;execute&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;CREATE VIEW my_tasty_snacks AS SELECT * FROM snacks WHERE food = 'Tasty';&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;With RailsOnPage, you&amp;#8217;re provided a &lt;span class="caps"&gt;DSL&lt;/span&gt; so that you can do the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;create_view&lt;/span&gt; &lt;span class="symbol"&gt;:my_tasy_snacks&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;view&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;view&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;select&lt;/span&gt;     &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;*&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;view&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;from&lt;/span&gt;       &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;snacks&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;view&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;conditions&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;food&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Tasty&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;small&gt;note: I haven&amp;#8217;t tested the above, just a hypothetical example&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;Anyhow, if you&amp;#8217;re in the habit of using views, functions, or triggers with your PostgreSQL database and are using Ruby on Rails, you might &lt;a href="http://github.com/alex3t/rails_on_pg"&gt;give RailsOnPg a whirl&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Wed, 21 Oct 2009 17:07:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:13c6817f-f554-4995-8fdc-7fb9b425dfae</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/21/railsonpg-released</link>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>PostgreSQL</category>
      <category>postgresql</category>
      <category>rubyonrails</category>
      <category>plugins</category>
      <category>databases</category>
    </item>
    <item>
      <title>Tracking AJAX-driven events in Ruby on Rails for Google Analytics conversion goals</title>
      <description>&lt;p&gt;Tracking your &lt;a href="http://en.wikipedia.org/wiki/Performance_indicator"&gt;&lt;span class="caps"&gt;KPI&lt;/span&gt;&amp;#8217;s&lt;/a&gt; is extremely important in your online venture. At a minimum, you should be using something like &lt;a href="http://www.google.com/analytics/"&gt;Google Analytics&lt;/a&gt; to track conversions in your application. Setting up goals is actually quite simple, especially if you&amp;#8217;re just tracking that specific pages are loaded. However, if some of your conversion points occur through &lt;span class="caps"&gt;AJAX&lt;/span&gt;, you might not be capturing those activities in Google Analytics.&lt;/p&gt;


	&lt;p&gt;Lucky for you, it&amp;#8217;s actually &lt;a href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;#38;answer=55520"&gt;quite simple to update this&lt;/a&gt;. I thought I&amp;#8217;d show you a fairly simple example to help you along.&lt;/p&gt;


	&lt;p&gt;On our web site, we have a mini contact form at the bottom of many of our pages. When submitted, if JavaScript is enabled, it&amp;#8217;ll perform an Ajax request to submit the form. If you fill out the main &lt;a href="http://planetargon.com/get-in-touch"&gt;Get in Touch&lt;/a&gt; form that gets processed and we redirect people to a thank you page. The &lt;span class="caps"&gt;URL&lt;/span&gt; for that is unique and we&amp;#8217;re able to track those in Google Analytics quite easily.&lt;/p&gt;


	&lt;p&gt;However, with the Ajax-form, the &lt;span class="caps"&gt;URL&lt;/span&gt; in the browser isn&amp;#8217;t going to change so Google Analytics isn&amp;#8217;t going to track that conversion. So, we needed to track that properly.&lt;/p&gt;


	&lt;p&gt;To do this, we just need to call a JavaScript function that the Google Analytics code provides you.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;pageTracker&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;_trackPageview&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/contact_requests/thanks&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Let&amp;#8217;s look at some simple code from our controller action. If the request is from JavaScript, we currently replace the form area with the content in a partial. (&lt;strong&gt;note&lt;/strong&gt;: if you&amp;#8217;re curious about the &lt;code&gt;_x&lt;/code&gt;, read &lt;a href="http://www.robbyonrails.com/articles/2007/08/01/designers-developers-and-the-x_-factor"&gt;Designers, Developers and the x_ factor&lt;/a&gt;)&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;respond_to&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
    &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;html&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt; &lt;span class="ident"&gt;redirect_to&lt;/span&gt; &lt;span class="symbol"&gt;:action&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="symbol"&gt;:thanks&lt;/span&gt; &lt;span class="punct"&gt;}&lt;/span&gt;
    &lt;span class="ident"&gt;format&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;js&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
      &lt;span class="ident"&gt;render&lt;/span&gt; &lt;span class="symbol"&gt;:update&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
        &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;replace&lt;/span&gt; &lt;span class="symbol"&gt;:x_mini_contact_form_module&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:partial&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;mini_contact_form_thanks&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;As you can see, the redirect will within the &lt;code&gt;format.html&lt;/code&gt; block will lead people to our conversion point. However, the &lt;code&gt;format.js&lt;/code&gt; block will keep the user on the current page and it&amp;#8217;ll not trigger Google Analytics to track the conversion. To make this happen, we&amp;#8217;ll just sprinkle in the following line of code.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;call&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;pageTracker._trackPageview(&amp;quot;/contact_requests/thanks&amp;quot;);&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;However, if you need to do something like this in several locations in your application, you might want to just extend the JavaScriptGenerator &lt;code&gt;page.&lt;/code&gt; GeneratorMethods. (you could toss this in &lt;code&gt;lib/&lt;/code&gt;, create a plugin, etc&amp;#8230;)&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;ActionView&lt;/span&gt;
    &lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;Helpers&lt;/span&gt;
      &lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;PrototypeHelper&lt;/span&gt;
        &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;JavaScriptGenerator&lt;/span&gt; &lt;span class="comment"&gt;#:nodoc:&lt;/span&gt;
          &lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;GeneratorMethods&lt;/span&gt;
            &lt;span class="comment"&gt;# Calls the Google Analytics pageTracker._trackPageview function with +path+.&lt;/span&gt;
            &lt;span class="comment"&gt;#&lt;/span&gt;
            &lt;span class="comment"&gt;# Examples:&lt;/span&gt;
            &lt;span class="comment"&gt;#&lt;/span&gt;
            &lt;span class="comment"&gt;#&lt;/span&gt;
            &lt;span class="comment"&gt;#  # Triggers: pageTracker._trackPageview('/contact_requests/thanks');&lt;/span&gt;
            &lt;span class="comment"&gt;#  page.track_page_view '/contact_requests/thanks'&lt;/span&gt;
            &lt;span class="comment"&gt;#&lt;/span&gt;
            &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;track_page_view&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;path&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
             &lt;span class="ident"&gt;record&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;pageTracker._trackPageview('&lt;span class="expr"&gt;#{path}&lt;/span&gt;');&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
            &lt;span class="keyword"&gt;end&lt;/span&gt;
          &lt;span class="keyword"&gt;end&lt;/span&gt;
        &lt;span class="keyword"&gt;end&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;This will allow us to do the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;track_page_view&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/contact_requests/thanks&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

  &lt;span class="comment"&gt;# or using a route/path&lt;/span&gt;
  &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;track_page_view&lt;/span&gt; &lt;span class="ident"&gt;thanks_contact_requests_path&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;So, our updated code now looks like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;render&lt;/span&gt; &lt;span class="symbol"&gt;:update&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;replace&lt;/span&gt; &lt;span class="symbol"&gt;:x_mini_contact_form_module&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:partial&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;mini_contact_form_thanks&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="ident"&gt;page&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;track_page_view&lt;/span&gt; &lt;span class="ident"&gt;thanks_contact_requests_path&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;With this in place, we can sprinkle similar code for our various conversion points that are Ajax-driven and Google Analytics will pick it up.&lt;/p&gt;


	&lt;p&gt;Happy tracking!&lt;/p&gt;
</description>
      <pubDate>Wed, 21 Oct 2009 13:09:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:aa29c8a0-a707-4a4d-9584-5126c65a91e7</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/21/tracking-ajax-driven-events-in-ruby-on-rails-for-google-analytics-conversion-goals</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>ajax</category>
      <category>rubyonrails</category>
      <category>analytics</category>
      <category>javascript</category>
      <category>prototype</category>
      <category>kpi</category>
      <category>conversions</category>
    </item>
    <item>
      <title>The 8-Hour Rails Code Audit</title>
      <description>&lt;p&gt;While our team is typically focused on larger client and internal projects, we do get an opportunity to assist businesses on a much smaller scale. Whether this be through retainer-based consulting or through code audits, we have seen a lot of Ruby on Rails code over what has nearly been&amp;#8230; five years!? We&amp;#8217;ve been able to compile a fairly extensive checklist that we use in our code audit process that we&amp;#8217;ve decided to streamline it into a smaller product.&lt;/p&gt;


	&lt;p&gt;Historically, this service has ranged anywhere from $2000-6000, depending the size and scope of the projects, but we want to help smaller startups&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt; and projects outline a roadmap for how they can begin to refactor and optimize their existing code base so that they can be more efficient at the start of 2010. So, we&amp;#8217;ve scaled things down into an extremely affordable flat-rate package where we work off of a pre-defined number of hours.[2]&lt;/p&gt;


	&lt;p&gt;Through the end of 2009, we&amp;#8217;re now offering &lt;a href="http://planetargon.com/what-we-do/development/rails-code-audit"&gt;the 8-Hour Rails Code Audit package&lt;/a&gt; for just $1000 &lt;span class="caps"&gt;USD&lt;/span&gt; (&lt;a href="http://planetargon.com/what-we-do/development/rails-code-audit"&gt;details&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re currently limiting this service to just two projects per week, &lt;a href="http://planetargon.com/get-in-touch"&gt;so reserve your spot now&lt;/a&gt;.&lt;/p&gt;


	&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; Larger projects are welcome to benefit from this service and custom quotes are available upon request.&lt;/p&gt;


	&lt;p id="fn2"&gt;&lt;sup&gt;2&lt;/sup&gt; As always, we&amp;#8217;re happy to discuss longer engagements.&lt;/p&gt;


	&lt;h3&gt;Related Posts&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/06/17/audit-your-rails-development-team"&gt;Audit Your Rails Development Team&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/06/18/rails-code-audits-and-reviews-continued"&gt;Rails Code Audits and Reviews, continued&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Tue, 20 Oct 2009 07:13:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:32523701-9fd6-41d0-beb9-189fdf069d63</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/20/the-8-hour-rails-code-audit</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>code</category>
      <category>codeaudit</category>
      <category>agile</category>
      <category>programming</category>
      <category>planetargon</category>
      <category>audit</category>
    </item>
    <item>
      <title>Flash Message Conductor now a Gem</title>
      <description>&lt;p&gt;We&amp;#8217;ve been doing some early (or late&amp;#8230; if you&amp;#8217;re a half-full kind of person) spring cleaning on some of our projects. One of the small projects, &lt;a href="http://github.com/planetargon/flash-message-conductor"&gt;flash_message_conductor&lt;/a&gt;, which &lt;a href="http://www.robbyonrails.com/articles/2008/08/29/flash-message-conductor"&gt;we released last year as a plugin&lt;/a&gt; is now a gem. We&amp;#8217;ve been &lt;a href="http://www.robbyonrails.com/articles/2009/01/13/question-plugins-or-gems-or-both"&gt;moving away from using plugins in favor of gems&lt;/a&gt; as we like locking in specific released versions and being able to specify them in our &lt;code&gt;environment.rb&lt;/code&gt; file is quite convenient.&lt;/p&gt;


	&lt;p&gt;To install, just run the following:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  sudo gem install flash-message-conductor --source=http://gemcutter.org
  Successfully installed flash-message-conductor-1.0.0
  1 gem installed
  Installing ri documentation for flash-message-conductor-1.0.0...
  Installing RDoc documentation for flash-message-conductor-1.0.0...
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You&amp;#8217;ll then just need to include the following in your &lt;code&gt;config/environment.rb&lt;/code&gt; file.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="constant"&gt;Rails&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Initializer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;run&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;gem&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;flash-message-conductor&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:lib&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;flash_message_conductor&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:source&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://gemcutter.org&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;You can take a peak at the &lt;a href="http://github.com/planetargon/flash-message-conductor/blob/master/README"&gt;&lt;span class="caps"&gt;README&lt;/span&gt;&lt;/a&gt; for usage examples.&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ll be packaging up a handful of our various plugins that we reuse on projects and moving them to gems. Stay tuned&amp;#8230; :-)&lt;/p&gt;
</description>
      <pubDate>Tue, 13 Oct 2009 10:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7f1572d8-0026-4620-b8de-f7e2b5a5ca63</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/10/13/flash-message-conductor-now-a-gem</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>gem</category>
      <category>plugins</category>
      <category>github</category>
      <category>development</category>
      <category>code</category>
      <category>rubyonrails</category>
    </item>
    <item>
      <title>Planting the seeds</title>
      <description>&lt;p&gt;Yesterday, the Rails team released 2.3.4, which includes standardized way for loading seed data into your application so that you didn&amp;#8217;t have to clutter your database migrations.&lt;/p&gt;


	&lt;p&gt;I noticed a few comments on some blogs where people were asking how to use this new feature, so here is a quick runthrough a few ways that you can use it.&lt;/p&gt;


	&lt;h2&gt;Populating Seed Data Approaches&lt;/h2&gt;


	&lt;p&gt;The &lt;code&gt;db/seeds.rb&lt;/code&gt; file is your playground. We&amp;#8217;ve been evolving our seed file on a new project and it&amp;#8217;s been great at allowing us to populate a really large data. Here are a few approaches that we&amp;#8217;ve taken to diversify our data so that when we&amp;#8217;re working on UI, we can have some diversified content.&lt;/p&gt;


	&lt;h3&gt;Basic example&lt;/h3&gt;


	&lt;p&gt;Any code that add to &lt;code&gt;db/seeds.rb&lt;/code&gt; is going to executed when you run &lt;code&gt;rake db:seed&lt;/code&gt;. You can do something as simple as:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;# db/seeds.rb

Article.create(:title =&amp;gt; 'My article title', :body =&amp;gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit')&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Just create database records like you would in your Rails application or in &lt;code&gt;script/console&lt;/code&gt;. Simple enough, right? Let&amp;#8217;s play with a few other approaches that we&amp;#8217;ve begun to use.&lt;/p&gt;


	&lt;h3&gt;Use the names of real people&lt;/h3&gt;


	&lt;p&gt;We&amp;#8217;re using the &lt;a href="http://github.com/fcoury/octopi/"&gt;Octopi gem&lt;/a&gt; to connect to github, collect all the names of people that follow me there, and using their names to seed our development database.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="attribute"&gt;@robby_on_github&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Octopi&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;User&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;robbyrussell&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;

&lt;span class="comment"&gt;# add a bunch of semi-real users&lt;/span&gt;
&lt;span class="attribute"&gt;@robby_on_github&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;followers&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;each&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt; &lt;span class="punct"&gt;|&lt;/span&gt;&lt;span class="ident"&gt;follower&lt;/span&gt;&lt;span class="punct"&gt;|&lt;/span&gt;
  &lt;span class="ident"&gt;github_person&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Octopi&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;User&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;follower&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;next&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;github_person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;nil?&lt;/span&gt;

  &lt;span class="comment"&gt;# split their name in half... good enough (like the goonies)&lt;/span&gt;
  &lt;span class="ident"&gt;first_name&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;github_person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;split&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;')[&lt;/span&gt;&lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
  &lt;span class="ident"&gt;last_name&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;github_person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;split&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;')[&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
  &lt;span class="ident"&gt;new_person&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:first_name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;first_name&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:last_name&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;last_name&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:email&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Internet&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;email&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                             &lt;span class="symbol"&gt;:password&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;secret&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:password_confirmation&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;secret&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt;
                             &lt;span class="symbol"&gt;:github_username&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;follower&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:website_url&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;github_person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;blog&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="comment"&gt;# ...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We do this with a few sources (twitter, github, etc..) to pull in the names of real people. If you want to be part of my seed data, you might &lt;a href="http://github.com/robbyrussell/"&gt;consider following me on Github&lt;/a&gt;. ;-)&lt;/p&gt;


	&lt;h3&gt;Use Faker for Fake data&lt;/h3&gt;


	&lt;p&gt;You may have noticed in the previous code sample, that I used Faker in that code. We are using this a bunch in our seed data file. With Faker, you can generate a ton of fake data really easy.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;links&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:title&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Lorem&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;words&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;7&lt;/span&gt;&lt;span class="punct"&gt;)+&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;').&lt;/span&gt;&lt;span class="ident"&gt;capitalize&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                    &lt;span class="symbol"&gt;:url&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://&lt;span class="expr"&gt;#{Faker::Internet.domain_name}&lt;/span&gt;/&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt;
                    &lt;span class="symbol"&gt;:description&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Lorem&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;sentences&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;4&lt;/span&gt;&lt;span class="punct"&gt;)+&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;'))&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We might toss something like that into a method so that we can do the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="attribute"&gt;@people&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;Person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:all&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;

&lt;span class="number"&gt;500&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;times&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;generate_link_for&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="attribute"&gt;@people&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;sort_by&lt;/span&gt;&lt;span class="punct"&gt;{&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;}[&lt;/span&gt;&lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;])&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;...and we&amp;#8217;ll get 500 links added randomly across all of the people we added to our system. You can get fairly creative here.&lt;/p&gt;


	&lt;p&gt;For example, we might even wanted random amounts of comments added to our links.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;generate_link_for&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;person&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="ident"&gt;link&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;person&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;links&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:title&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Lorem&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;words&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;7&lt;/span&gt;&lt;span class="punct"&gt;)+&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;').&lt;/span&gt;&lt;span class="ident"&gt;capitalize&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                             &lt;span class="symbol"&gt;:url&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://&lt;span class="expr"&gt;#{Faker::Internet.domain_name}&lt;/span&gt;/&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt;
                             &lt;span class="symbol"&gt;:description&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Lorem&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;sentences&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;4&lt;/span&gt;&lt;span class="punct"&gt;)+&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;join&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt; &lt;/span&gt;&lt;span class="punct"&gt;'))&lt;/span&gt;

  &lt;span class="comment"&gt;# let's randomly add some comments...&lt;/span&gt;
  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;link&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;valid?&lt;/span&gt;
    &lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;5&lt;/span&gt;&lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;times&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
      &lt;span class="ident"&gt;link&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;comments&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;create&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:person_id&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="attribute"&gt;@people&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;sort_by&lt;/span&gt;&lt;span class="punct"&gt;{&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;}[&lt;/span&gt;&lt;span class="number"&gt;0&lt;/span&gt;&lt;span class="punct"&gt;].&lt;/span&gt;&lt;span class="ident"&gt;id&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;
                           &lt;span class="symbol"&gt;:body&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;Faker&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Lorem&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;paragraph&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;rand&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;3&lt;/span&gt;&lt;span class="punct"&gt;)+&lt;/span&gt;&lt;span class="number"&gt;1&lt;/span&gt;&lt;span class="punct"&gt;))&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;It&amp;#8217;s not beautiful, but it gets the job done. It makes navigating around the application really easy so that we aren&amp;#8217;t having to constantly input new data all the time. As mentioned, it really helps when we&amp;#8217;re working on the UI.&lt;/p&gt;


	&lt;h2&gt;Your ideas?&lt;/h2&gt;


	&lt;p&gt;We&amp;#8217;re trying a handful of various approaches to seed our database. If you have some fun ways of populating your development database with data, we&amp;#8217;d love to hear about it.&lt;/p&gt;
</description>
      <pubDate>Sat, 05 Sep 2009 08:00:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:18d867c2-4616-46cd-b01d-be922b00ccf5</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/09/05/planting-the-seeds</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>seeds</category>
      <category>database</category>
      <category>development</category>
      <category>workflow</category>
      <category>faker</category>
      <category>github</category>
      <category>rubyonrails</category>
      <category>code</category>
    </item>
    <item>
      <title>So long and thanks for all the hoodwinks</title>
      <description>&lt;p&gt;_why,&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re out there and come across this&amp;#8230; know that one of my fondest memories on the internet was with you. Hoodink.d was one of the greatest things on the internet four years ago and I suspect that a very tiny fraction of the Ruby community has even heard of it.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/3838279665/" title="Thanks hoodwink'd by Robby Russell, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3450/3838279665_90a7e7632b_o.jpg" width="421" height="199" alt="Thanks hoodwink'd" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Fortunately for me, I have a copy of the hoodwink git repository and was able to get it running tonight in hopes that I might find you lurking in the mousehole. I&amp;#8217;m convinced that you are in a parallel internetverse. Perhaps you might send me an invite.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/3838274563/" title="Hoodwink'd. do you remember? by Robby Russell, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3437/3838274563_07ee2d960d.jpg" width="465" height="500" alt="Hoodwink'd. do you remember?" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I miss hoodwink&amp;#8230; and if you stay missing, I&amp;#8217;ll just miss hoodwink more.&lt;/p&gt;


	&lt;p&gt;In the meantime, I wonder how hard it&amp;#8217;ll be to get hoodwink to run on rack.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/3839209620/" title="the winker's satellite office » login by Robby Russell, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3520/3839209620_a62e917f8d.jpg" width="500" height="368" alt="the winker's satellite office » login" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Wink you on the other side,
Robby&lt;/p&gt;


	&lt;p&gt;p.s. you can find me in my own mousehole&amp;#8230; should you want to send me an invite and/or feed me cheese.&lt;/p&gt;


	&lt;h2&gt;Related Posts&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2005/08/25/thank-you-hoodwink-d"&gt;Thank you hoodwink.d&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Thu, 20 Aug 2009 00:24:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6cb5176a-e3e2-40da-be6e-ecb45fe11737</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/08/20/so-long-and-thanks-for-all-the-hoodwinks</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>_why</category>
      <category>hoodwinkd</category>
      <category>nostalgia</category>
    </item>
    <item>
      <title>Ch-ch-ch-changes at Planet Argon</title>
      <description>&lt;p&gt;Now that the cat is out of the bag, I can share some recent news with you. Earlier today, we announced that &lt;a href="http://blueboxgrp.com/"&gt;Blue Box Group&lt;/a&gt; had acquired &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt;, our kickass deployment solution for Ruby on Rails applications.&lt;/p&gt;


	&lt;p&gt;Our team has been offering hosting services for over six years. When I made the decision to start providing Rails hosting over four years ago, it was something that I thought the community needed to validate that Ruby on Rails was a viable solution for building web applications. At the time, there was only one or two companies offering pre-configured solutions. The good ole days. :-)&lt;/p&gt;


	&lt;p&gt;Over the course of the past 4+ years, we&amp;#8217;ve helped deploy and host well over a thousand web applications built with Ruby on Rails. Perhaps we even hosted your site at one point or another. We definitely had a lot of fun and learned a lot from our experience.&lt;/p&gt;


	&lt;p&gt;Fast-forward four years, the community now has several great solutions and options for hosting their Ruby on Rails
applications. Knowing this, we began to look over the &lt;a href="http://planetargon.com/what-we-do?src=robbyonrails"&gt;plethora of services that we offer&lt;/a&gt; and felt that we had been spreading ourselves too thinly. We were faced with the big question of: Should we focus our energy on trying to innovate in this competitive space or should we find a community-respected vendor to pass the torch to?&lt;/p&gt;


	&lt;p&gt;Rails Boxcar is a product that we are extremely proud of and believe the acquisition by Blue Box Group will be great for our existing customers. The acquisition is going to benefit our customers as they&amp;#8217;ll be able to interface with a team with more resources. A team that also aims to innovate in this space and believes that Rails Boxcar will help them do that.&lt;/p&gt;


	&lt;p&gt;As a byproduct of this deal, our team has an opportunity to focus our collective energy on designing and developing web applications, which has also been a central part of what we do for as long as we&amp;#8217;ve been in business. We plan to speed up our efforts on a handful web-based products that we&amp;#8217;ve been internally developing and hope to release in the near future.&lt;/p&gt;


	&lt;p&gt;I had the pleasure of getting to talk thoroughly with the team at Blue Box Group and really feel like they&amp;#8217;ll be able to focus their energy on maintaining and innovating within the Ruby on Rails hosting world.. definitely more than we could over the coming years. In the end, the acquisition is going to benefit our customers the most as they&amp;#8217;ll be able to interface with a larger team that is innovating in this space.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re interested in learning more about the acquisition, please &lt;a href="http://www.prlog.org/10308400.html"&gt;read the press release&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;From our perspective, this is a win-win-win situation for everyone involved. Expect to see some more news from us in the near future&amp;#8230; and if you&amp;#8217;re looking for a design and development team, don&amp;#8217;t hesitate to &lt;a href="http://planetargon.com/get-in-touch?src=robbyonrails"&gt;get in touch with us&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Wed, 12 Aug 2009 18:31:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:de57f385-d412-424c-9b80-de710ef0b600</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/08/12/ch-ch-ch-changes-at-planet-argon</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PLANET ARGON</category>
      <category>rails</category>
      <category>boxcar</category>
      <category>planet</category>
      <category>argon</category>
      <category>business</category>
      <category>blue</category>
      <category>box</category>
      <category>group</category>
      <category>hosting</category>
      <category>rubyonrails</category>
      <category>announcement</category>
    </item>
    <item>
      <title>Slides from my Rails Underground 2009 talk</title>
      <description>&lt;p&gt;Hello from London!&lt;/p&gt;


	&lt;p&gt;Am currently enjoying the talks at Rails Underground 2009 in London and had the pleasure to be one of the first speakers at the conference. My talk covered a collection of what our team considers best practices. Best practices that aid in the successful launch of a web application and covered a few Rails-specific topics as well.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll be sharing some posts in the coming week(s) that&amp;#8217;ll expand on some of these topics as promised to the audience.&lt;/p&gt;


&lt;div style="width:425px;text-align:left" id="__ss_1770095"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/robbyrussell/launching-ruby-on-rails-projects-a-checklist" title="Launching Ruby on Rails projects: A checklist"&gt;Launching Ruby on Rails projects: A checklist&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=launching-rails-apps-090726062406-phpapp02&amp;#38;stripped_title=launching-ruby-on-rails-projects-a-checklist" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=launching-rails-apps-090726062406-phpapp02&amp;#38;stripped_title=launching-ruby-on-rails-projects-a-checklist" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;documents&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/robbyrussell"&gt;Robby Russell&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;

	&lt;p&gt;Since I covered a wide range of topics, I decided to share my slides online. They won&amp;#8217;t provide as much context (as I&amp;#8217;m not speaking as you&amp;#8217;ll look at them), but they might hint at some of the topics that I covered. There was a guy video taping the talks&amp;#8230; so I assume that a video of my talk will be posted online in the near future.&lt;/p&gt;


	&lt;p&gt;Until then&amp;#8230; &lt;a href="http://www.slideshare.net/robbyrussell/launching-ruby-on-rails-projects-a-checklist"&gt;here are the slides&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Fri, 24 Jul 2009 10:37:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3310f57f-0e48-45d1-b8b0-e306f57657c3</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/07/24/slides-from-my-rails-underground-2009-talk</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>hosting</category>
      <category>rubyonrails</category>
      <category>agile</category>
      <category>conference</category>
      <category>deployment</category>
      <category>london</category>
      <category>talk</category>
      <category>feedback</category>
      <category>seo</category>
      <category>railsunder</category>
      <category>presentation</category>
      <category>analytics</category>
      <category>sem</category>
    </item>
    <item>
      <title>Launching Rails projects, an open call for lessons learned</title>
      <description>&lt;p&gt;I&amp;#8217;m working on &lt;a href="http://www.robbyonrails.com/articles/2009/06/18/speaking-at-rails-underground-2009"&gt;my presentation&lt;/a&gt; for &lt;a href="http://www.rails-underground.com/"&gt;Rails Underground&lt;/a&gt; and was hoping to solicit a few tips from other people in the industry.&lt;/p&gt;


	&lt;p&gt;Have you launched a Ruby on Rails application recently? Are there some things that you wish you had known beforehand?&lt;/p&gt;


	&lt;p&gt;Mind sharing? You can email me with your story at  &lt;a href="mailto:robby+launchstory@planetargon.com"&gt;robby+launchstory@planetargon.com&lt;/a&gt;. I&amp;#8217;ll let you know if your tip gets used in the presentation and please indicate if you&amp;#8217;d be okay with me posting your tip in a future blog post.&lt;/p&gt;
</description>
      <pubDate>Tue, 23 Jun 2009 12:33:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:370686db-a712-41f6-8024-baeaf261bc5a</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/23/launching-rails-projects-an-open-call-for-lessons-learned</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>launching</category>
      <category>rubyonrails</category>
      <category>tips</category>
      <category>conference</category>
      <category>rails</category>
      <category>lessons</category>
    </item>
    <item>
      <title>Using model constants for project sanity</title>
      <description>&lt;p&gt;On one of our larger client projects (approx. 160 models and growing&amp;#8230;) we have a specific model that we refer to quite a bit throughout our code. This model contains less than 10 records, but each of them sits on top of an insanely large and complex set of data. Each record refers to a each of their regions that our client does business in.&lt;/p&gt;


	&lt;p&gt;For example&amp;#8230; we have, Australia, United Kingdom, Canada, United States, and so forth. Each of these regional divisions has their own company code, which are barely distinguishable from the next. They make sense to our client, but when we&amp;#8217;re not interacting with those codes on a regular basis, we have to look constantly look them up again to make sure we&amp;#8217;re dealing with the right record.&lt;/p&gt;


	&lt;p&gt;I wanted to share something that we did to make this easier for our team to work around these codes, which we should have thought of &lt;em&gt;long&lt;/em&gt; ago.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s take the following mode, &lt;code&gt;Division&lt;/code&gt;. We only have about 10 records in our database, but have conditional code throughout the site that are dependent upon which divisions specific actions are being triggered within. Each division has various business logic that we have to maintain.&lt;/p&gt;


	&lt;p&gt;Prior to our change, we&amp;#8217;d come across a lot of code like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="comment"&gt;# For all divisions except Canada, invoices are sent via email&lt;/span&gt;
&lt;span class="comment"&gt;# In Canada, invoices are sent via XML to a 3rd-party service&lt;/span&gt;
&lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;process_invoices_for&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;division&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;division&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;code&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;XIUHR12&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
    &lt;span class="comment"&gt;# trigger method to send invoices to 3rd party service&lt;/span&gt;
    &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="keyword"&gt;else&lt;/span&gt;
    &lt;span class="comment"&gt;# batch up invoices and send via email&lt;/span&gt;
    &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;An alternative that we&amp;#8217;d also find ourselves using was.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;division&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;name&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Canada&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Hell, I think I&amp;#8217;ve even seen &lt;code&gt;if division.id == 2&lt;/code&gt; somewhere in the code before. To be fair to ourselves, we did inherit this project a few years ago. ;-)&lt;/p&gt;


	&lt;p&gt;Throughout the code base, you&amp;#8217;ll find business rules like this. Our developers all agreed that this was far from friendly and/or efficient and worst of all, it was extremely error-prone. There have been a few incidents where we read the code wrong and/or got them confused with one another. We were lacking a convention that we could all begin to rely on and use.&lt;/p&gt;


	&lt;p&gt;So, we decided to implement the following change.&lt;/p&gt;


	&lt;h3&gt;Model Constants&lt;/h3&gt;


	&lt;p&gt;You might already use constants in your Ruby on Rails application. It&amp;#8217;s not uncommon to add a few into &lt;code&gt;config/environment.rb&lt;/code&gt; and call it a day, but you might also consider scoping them within your models. (makes it much easier for you to maintain them as well)&lt;/p&gt;


	&lt;p&gt;In our scenario, we decided to add the following constants to our &lt;code&gt;division&lt;/code&gt; model.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Division&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="constant"&gt;AFRICA&lt;/span&gt;      &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XYU238&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="constant"&gt;ASIA&lt;/span&gt;        &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XIUHR73&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="constant"&gt;AUSTRALIA&lt;/span&gt;   &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XIUHR152&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="constant"&gt;CANADA&lt;/span&gt;      &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XIUHR12&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="constant"&gt;USA&lt;/span&gt;         &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XIUHR389&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
  &lt;span class="comment"&gt;# etc..&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;What this will do is load up ech of these constants with the corresponding object. It&amp;#8217;s basically the equivallent of us doing:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;division&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="constant"&gt;Division&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_code&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;XIUHR389&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;But, with this approach, we can stop worrying about their codes and use the division names that we&amp;#8217;re talking about with our clients. Our client usually approaches us with, &amp;#8220;In Australia, we need to do X,Y,Z differently than we do in the other divisions due to new government regulations.&amp;#8221;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;division&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="constant"&gt;Division&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;CANADA&lt;/span&gt;
  &lt;span class="comment"&gt;# ...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="keyword"&gt;case&lt;/span&gt; &lt;span class="ident"&gt;division&lt;/span&gt;
  &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="constant"&gt;Division&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;AFRICA&lt;/span&gt;
    &lt;span class="comment"&gt;#&lt;/span&gt;
  &lt;span class="keyword"&gt;when&lt;/span&gt; &lt;span class="constant"&gt;Division&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;AUSTRALIA&lt;/span&gt;
    &lt;span class="comment"&gt;# ...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We are finding this to be &lt;em&gt;much&lt;/em&gt; easier to read and maintain. When we&amp;#8217;re dealing with a lot of complex business logic in the application, little changes like this can make a big difference.&lt;/p&gt;


	&lt;p&gt;If you have any alternative solutions, we&amp;#8217;d love to hear them. Until then, we&amp;#8217;ve been quite pleased with this approach. Perhaps you&amp;#8217;ll find some value in it as well.&lt;/p&gt;
</description>
      <pubDate>Tue, 23 Jun 2009 01:39:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:fc030737-c47e-4235-ae26-e5960f67d81b</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/23/using-model-constants-for-project-sanity</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>development</category>
      <category>ruby</category>
      <category>rubyonrails</category>
      <category>model</category>
      <category>activerecord</category>
      <category>businesslogic</category>
      <category>code</category>
    </item>
    <item>
      <title>Aliasing resources in Ruby on Rails</title>
      <description>&lt;p&gt;Earlier today, a friend working on a project asked me how we approached routes on our website. If you take a quick peak at &lt;a href="http://planetargon.com/"&gt;our website&lt;/a&gt;, you&amp;#8217;ll see that we have URLs like so:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://planetargon.com/"&gt;http://planetargon.com/&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://planetargon.com/who-we-are"&gt;http://planetargon.com/who-we-are&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://planetargon.com/who-we-are/robby-russell"&gt;http://planetargon.com/who-we-are/robby-russell&lt;/a&gt;

	&lt;p&gt;I couldn&amp;#8217;t remember where I came across this before and wasn&amp;#8217;t quickly finding it in the &lt;a href="http://api.rubyonrails.org"&gt;Ruby on Rails &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;, so decided that I&amp;#8217;d do a quick write up on it.&lt;/p&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;When we launched our new site a few months ago, we were working off an existing code base. We have a model named, &lt;code&gt;TeamMember&lt;/code&gt; and a corresponding controller. When we decided to come up with new conventions for our &lt;span class="caps"&gt;URL&lt;/span&gt; structure, we opted to ditch the normal Rails conventions and go our own route. What we weren&amp;#8217;t sure about was how to alias resources in our routes nicely. After some digging around, we came across the &lt;code&gt;:as&lt;/code&gt; option.&lt;/p&gt;


	&lt;p&gt;So, our route was:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;map&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;resources&lt;/span&gt; &lt;span class="symbol"&gt;:team_members&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Which provided us with:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;/team_members&lt;/li&gt;
		&lt;li&gt;/team_members/robby-russell&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We simply added &lt;code&gt;:as =&amp;gt; 'who-we-are'&lt;/code&gt; to our route:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;map&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;resources&lt;/span&gt; &lt;span class="symbol"&gt;:team_members&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:as&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;who-we-are&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;...and we got exactly what we were looking for in our URLs.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
* /who-we-are
* /who-we-are/gary-blessington
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;If you &lt;a href="http://planetargon.com"&gt;look at our site&lt;/a&gt;, you&amp;#8217;ll notice that we did this in a few areas of our application so that we could define our own &lt;span class="caps"&gt;URL&lt;/span&gt; structure that was more friendly for visitors and search engines.&lt;/p&gt;


	&lt;p&gt;Anyhow, just a quick tip for those who want to change up their URLs with Ruby on Rails.&lt;/p&gt;


	&lt;p&gt;p.s., if you know where I can find this documented, let me know so that I can provide a &lt;span class="caps"&gt;URL&lt;/span&gt; in this post for others. :-)&lt;/p&gt;
</description>
      <pubDate>Tue, 23 Jun 2009 01:00:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:86d03112-712c-4662-8be3-6d1067c5242f</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/23/aliasing-resources-in-ruby-on-rails</link>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>routes</category>
      <category>seo</category>
      <category>development</category>
    </item>
    <item>
      <title>Speaking at Rails Underground 2009</title>
      <description>&lt;p&gt;It&amp;#8217;s time to find my passport again&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/2241810168/" title="Waiting at Gatwick Airport by Robby Russell, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2312/2241810168_2af66d4a2e.jpg" width="500" height="375" alt="Waiting at Gatwick Airport" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been invited to speak at &lt;a href="http://railsunderground.com/"&gt;Rails Underground&lt;/a&gt;, which is being held in London, UK from July 24-25th.&lt;/p&gt;


	&lt;p&gt;My talk, which is tentatively titled, &lt;strong&gt;&amp;#8220;Launching Ruby on Rails projects, a checklist&amp;#8221;&lt;/strong&gt;, will expand on several ideas that came out a &lt;a href="http://www.robbyonrails.com/articles/2008/12/14/launching-ruby-on-rails-projects-a-checklist"&gt;previous article on the topic&lt;/a&gt;. Additionally, I plan to share some of the lessons that we&amp;#8217;ve learned at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; as we&amp;#8217;ve launched projects over last several years.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.rails-underground.com" title="I'm speaking at Rails Underground!"&gt;&lt;img src="http://www.rails-underground.com/images/speaker_badge.png" alt="I'm speaking at Rails Underground!"/&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re able to make it, I encourage you to &lt;a href="http://bw.eventwax.com/rails-underground-09/register"&gt;register for the event&lt;/a&gt; before it&amp;#8217;s too late. Take a quick peak at the &lt;a href="http://www.rails-underground.com/09-conference-speakers.html"&gt;list of speakers&lt;/a&gt;. I&amp;#8217;m grateful to the event organizers for the invite and look forward to seeing/meeting all of the attendees!&lt;/p&gt;


	&lt;p&gt;Also, for those of you in the London area. If you&amp;#8217;re seeking a design and development team that specializes in Ruby on Rails and want to schedule a meeting with me while I&amp;#8217;m visiting, don&amp;#8217;t hesitate to &lt;a href="http://planetargon.com/get-in-touch"&gt;get in touch with us&lt;/a&gt;. I&amp;#8217;m planning on staying a few days extra around the conference dates to visit some of our existing clients and would be happy to meet you.&lt;/p&gt;


&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/JpUbmkyrBjs&amp;#38;hl=en&amp;#38;fs=1&amp;#38;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/JpUbmkyrBjs&amp;#38;hl=en&amp;#38;fs=1&amp;#38;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;
</description>
      <pubDate>Thu, 18 Jun 2009 08:40:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1bdde6ad-c174-4731-ba01-10826094969f</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/18/speaking-at-rails-underground-2009</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>speaking</category>
      <category>conference</category>
      <category>london</category>
      <category>rubyonrails</category>
      <category>planetargon</category>
      <category>railsunderground</category>
    </item>
    <item>
      <title>Howdy Rip!</title>
      <description>&lt;p&gt;Chris Wanstrath (&lt;a href="http://twitter.com/defunkt"&gt;@defunkt&lt;/a&gt;) just posted the following on twitter.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;Hello Rip &amp;#8211; &lt;a href="http://hellorip.com/"&gt;http://hellorip.com/&lt;/a&gt;&amp;#8220;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;The &lt;a href="http://hellorip.com/about.html"&gt;Rip project describes itself&lt;/a&gt; as, &amp;#8220;an attempt to create a next generation packaging system for Ruby.&amp;#8221;&lt;/p&gt;


	&lt;p&gt;One of the cool features is that it supports multiple environments. For example, you can have different Rip environments (with different gem versioning) that are targeted towards specific applications. I have to dig around more through the project, but this looks fascinating.&lt;/p&gt;


	&lt;p&gt;Check it out at &lt;a href="http://hellorip.com/"&gt;http://hellorip.com/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m also curious as to how you think you might be able to start using this.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;What are some ways that you could use Rip&lt;/strong&gt;&amp;#8212;&lt;a href="http://heybrainstormr.com/t/pgte"&gt;http://heybrainstormr.com/t/pgte&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Thu, 11 Jun 2009 12:35:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d1faaf2a-7cb7-45b9-b969-924c8179379b</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/11/howdy-rip</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>ruby</category>
      <category>rubygems</category>
      <category>gems</category>
      <category>git</category>
      <category>github</category>
      <category>rubyonrails</category>
      <category>development</category>
    </item>
    <item>
      <title>Hello, HeyBrainstormr.com</title>
      <description>&lt;p&gt;If you &lt;a href="http://twitter.com/robbyrussell"&gt;follow me on twitter&lt;/a&gt;, you might have heard that we launched a little project that we&amp;#8217;ve been cooking up at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt;. (&lt;a href="http://planetargon.com/news/2009/6/2/heybrainstormr-launched"&gt;news post&lt;/a&gt;)&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://heybrainstormr.com"&gt;HeyBrainstormr&lt;/a&gt; is a lightweight web application that we created so that we could start a brainstorm on a specific topic and solicit ideas from each other. That&amp;#8217;s all it does. Nothing more. Nothing less.&lt;/p&gt;


	&lt;p&gt;We know that having an open brainstorming session requires there to be zero criticism and opted to keep the process anonymous so that even the quiet people could share their ideas. :-)&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/b12hi/what-can-i-do-right-now-brainstorming-for-the-rest-of-us-heybrainstormr"&gt;&lt;img src="http://img.skitch.com/20090603-njuf1rttuf7bgn8jna1fjihjeb.preview.jpg" alt="what can i do right now? : Brainstorming for the rest of us. : HeyBrainstormr" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;We&amp;#8217;ll be posting more details about it on our blog in the near future, but wanted to invite all of my readers to give it a whirl.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://heybrainstormr.com"&gt;Start a brainstorm now!&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I have a few topics that I started (and &lt;a href="http://twitter.com/robbyrussell"&gt;tweeted&lt;/a&gt; about). Feel free to share your ideas on them. :-)&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://heybrainstormr.com/t/oM4z"&gt;I need some music suggestions. Help?&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://heybrainstormr.com/t/vwC1"&gt;I have writers block. Help me come up with some blog topic ideas?&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://heybrainstormr.com/t/zmBu"&gt;what can i do right now?&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;We hope that you find it as fun as we have.&lt;/p&gt;
</description>
      <pubDate>Wed, 03 Jun 2009 18:28:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:e809a33f-b8fe-4520-a9e4-fb14d148eedb</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/06/03/hello-heybrainstormr-com</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>heybrainstormr</category>
      <category>brainstormr</category>
      <category>launch</category>
      <category>brainstorming</category>
      <category>agile</category>
      <category>design</category>
      <category>development</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>82,520 minutes on Phusion Passenger</title>
      <description>&lt;p&gt;It&amp;#8217;s been over 83,520 minutes since I made the switch from using mongrel as my development environment web server to &lt;a href="http://www.modrails.com/"&gt;Phusion Passenger&lt;/a&gt;. I&amp;#8217;ve been extremely impressed with it. &lt;a href="http://planetargon.com/who-we-are"&gt;Our team&lt;/a&gt; has all switched over and haven&amp;#8217;t really hit any obstacles in the transition.&lt;/p&gt;


	&lt;p&gt;Since some people asked me to let them know how this trial period worked out, I felt it was my duty to encourage you all to try it. You can check out my previous post, &lt;a href="http://www.robbyonrails.com/articles/2009/02/11/switch-to-passenger-mod_rails-in-development-on-osx-in-less-than-7-minutes-or-your-money-back"&gt;Switch to Passenger (mod_rails) in development on &lt;span class="caps"&gt;OSX&lt;/span&gt; in less than 7 minutes or your money back!&lt;/a&gt; to get rolling.&lt;/p&gt;


	&lt;p&gt;Additionally, if you&amp;#8217;re looking for a streamlined Ruby on Rails deployment environment that includes Passenger, check out &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Fri, 10 Apr 2009 05:10:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4b873084-0255-45dc-b0f2-d2849eb352a0</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/04/10/82-520-minutes-on-phusion-passenger</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>passenger</category>
      <category>mongrel</category>
      <category>development</category>
      <category>osx</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>railsboxcar</category>
      <category>hosting</category>
      <category>deployment</category>
    </item>
    <item>
      <title>20 articles on Cucumber and a free beverage recipe!</title>
      <description>&lt;p&gt;&lt;a href="http://cukes.info/"&gt;Cucumber&lt;/a&gt; has been getting quite a bit of attention in the community and with the new &lt;a href="http://www.pragprog.com/titles/achbd/the-rspec-book"&gt;RSpec Book&lt;/a&gt; on nearing publication, I predict that by this time next year, it&amp;#8217;ll become a household word like &lt;a href="http://en.wiktionary.org/wiki/boanthropy"&gt;boanthropy&lt;/a&gt;.&lt;/p&gt;


	&lt;h2&gt;What is Cucumber?&lt;/h2&gt;


	&lt;p&gt;The Cucumber project describes itself as a suite that, &amp;#8220;&lt;em&gt;lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid &amp;#8211; all rolled into one format.&lt;/em&gt;&amp;#8220;&lt;/p&gt;


	&lt;p&gt;One of the great things about Cucumber is that it can be used to test applications in any language. I haven&amp;#8217;t been able to track down a lot of articles of how people are using it with other languages, so please comment if you&amp;#8217;re aware of some.&lt;/p&gt;


	&lt;p&gt;In any event, I&amp;#8217;ve been collecting and reading resources from a variety of Cucumber aficionados and thought I&amp;#8217;d share some links with you. To round it out, I &lt;a href="http://twitter.com/robbyrussell/status/1487899554"&gt;asked on twitter&lt;/a&gt; for some others so that I could hit twenty. :-)&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;&lt;a href="http://dannorth.net/whats-in-a-story"&gt;What’s in a Story?&lt;/a&gt;, Dan North&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.josephwilk.net/ruby/telling-a-good-story-rspec-stories-from-the-trenches.html"&gt;Telling a good story &amp;#8211; Rspec stories from the trenches&lt;/a&gt;, Joseph Wilk&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://railscasts.com/episodes/155-beginning-with-cucumber"&gt;Beginning with Cucumber&lt;/a&gt;, Ryan Bates (Railscasts)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.brightbox.co.uk/posts/using-rspec-cucumber-and-user-stories-to-build-our-internal-systems"&gt;Using RSpec, Cucumber and User stories to build our internal systems&lt;/a&gt;, Rahoul Baruah&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.rubyinside.com/cucumber-the-latest-in-ruby-testing-1342.html"&gt;Cucumber: The Latest in Ruby Testing&lt;/a&gt;, Ruby Inside&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.pathf.com/blogs/2009/03/using-cucumber-for-acceptance-testing/"&gt;Using Cucumber for Acceptance Testing&lt;/a&gt;, Noel Rappin&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.slideshare.net/bkeepers/behavior-driven-development-with-cucumber-presentation"&gt;Behavior Driven Development with Cucumber&lt;/a&gt;, Brandon Keepers (presentation/slides)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://pivotallabs.com/users/jdean/blog/articles/763-testing-capistrano-recipes-with-cucumber"&gt;Testing capistrano recipes with cucumber&lt;/a&gt;, Jeff Dean&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.benmabey.com/2009/02/17/using-cucumber-to-integrate-distributed-systems-and-test-messaging/"&gt;Using Cucumber to Integrate Distributed Systems and Test Messaging&lt;/a&gt;, Ben Mabey&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.pmamediagroup.com/2009/04/tutorial-how-to-install-setup-cucumber/"&gt;Tutorial: How to install/setup Cucumber&lt;/a&gt;, Alan Mitchell&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://drnicwilliams.com/2009/03/26/testing-outbound-emails-with-cucumber/"&gt;Testing outbound emails with Cucumber&lt;/a&gt;, Dr. Nic Willians&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://japhr.blogspot.com/2009/03/proper-cucumber-sintatra-driving.html"&gt;Proper Cucumber Sintatra Driving&lt;/a&gt;, Chris Strom&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://thomaslundstrom.blogspot.com/2009/03/on-getting-started-with-using-cucumber.html"&gt;On getting started using Cucumber for .NET&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://blog.mattwynne.net/2008/11/14/dry-up-your-cucumber-steps/"&gt;&lt;span class="caps"&gt;DRY&lt;/span&gt; up your Cucumber Steps&lt;/a&gt;, Matt Wynne&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://skillsmatter.com/podcast/ajax-ria/cucumber-celerity-firewatir"&gt;Cucumber, Celerity, &amp;#38; FireWatir&lt;/a&gt;, Aidy Lewis (presentation/video)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.brynary.com/2009/2/3/cucumber-step-definition-tip-stubbing-time"&gt;Cucumber step definition tip: Stubbing time&lt;/a&gt;, Bryan Helmkamp&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.infoq.com/news/2009/03/bdd-with-cucumber"&gt;Story Driven Development Recipes with Cucumber&lt;/a&gt;, Sebastien Auvray&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://opensoul.org/2009/3/6/testing-facebook-with-cucumber"&gt;Testing Facebook with Cucumber&lt;/a&gt;, Brandon Keepers&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://itsignals.cascadia.com.au/?p=30"&gt;Testing with the help of machinist, forgery, cucumber, webrat and rspec&lt;/a&gt;, Etienne van Tonder&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://devcaffeine.com/2009/02/16/integration-testing-ssl-with-cucumber/"&gt;Integration testing &lt;span class="caps"&gt;SSL&lt;/span&gt; with Cucumber&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://devcaffeine.com/2009/02/16/integration-testing-ssl-with-cucumber/"&gt;Continuous Integration Blueprints: How to Build an Army of Killer Robots With Hudson and Cucumber&lt;/a&gt;&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;So.. there you have it. Please post comments with links to any useful articles not mentioned and I&amp;#8217;ll try to keep the list updated.&lt;/p&gt;


	&lt;p&gt;Also, be sure to check out the &lt;a href="http://wiki.github.com/aslakhellesoy/cucumber/tutorials-and-related-blog-posts"&gt;list of tutorials and related blog posts&lt;/a&gt; on the &lt;a href="http://wiki.github.com/aslakhellesoy/cucumber/"&gt;cucumber wiki&lt;/a&gt; (github).&lt;/p&gt;


	&lt;h2&gt;&lt;span class="caps"&gt;FREE RECIPE&lt;/span&gt;: Cucumber Water&lt;/h2&gt;


	&lt;p&gt;&lt;img src="http://robbyonrails.com/files/3225964781_428d359aa5_m.jpg" style="float:right;" /&gt;
And now&amp;#8230;for the reason you are all here! If you like cucumbers (eating them)... I would highly recommend heading to your local farmers market and purchasing some cucumbers. Aside from being healthy to eat&amp;#8230; they can help make a tasty beverage.&lt;/p&gt;


	&lt;p&gt;Then do the following&amp;#8230;&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Chop several slices of a cucumber&lt;/li&gt;
		&lt;li&gt;Fill a pitcher with cold water and ice&lt;/li&gt;
		&lt;li&gt;Toss in slices of cucumber&lt;/li&gt;
		&lt;li&gt;Stir and leave in fridge for a while&lt;/li&gt;
		&lt;li&gt;Take out of fridge, pour into cup&amp;#8230;&lt;/li&gt;
		&lt;li&gt;Drink&amp;#8230; hack&amp;#8230; and enjoy&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Be sure to check out, &lt;a href="http://www.wikihow.com/Make-Cucumber-Water"&gt;How to Make Cucumber Water&lt;/a&gt; on wikihow for details.&lt;/p&gt;


	&lt;p&gt;Happy Hacking!&lt;/p&gt;


	&lt;h2&gt;Related Posts (by me)&lt;/h2&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2008/08/19/rspec-it-should-behave-like"&gt;RSpec: It Should Behave Like&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/08/02/spec-your-views"&gt;Spec Your Views&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/06/17/audit-your-rails-development-team"&gt;Audit Your Rails Development Team&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/02/08/is-bdd-kinkier-than-tdd"&gt;Is &lt;span class="caps"&gt;BDD&lt;/span&gt; kinkier than &lt;span class="caps"&gt;TDD&lt;/span&gt;?&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Thu, 09 Apr 2009 22:22:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:18dfd567-2034-43c7-bf69-54f37498669b</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/04/09/20-articles-on-cucumber-and-a-free-beverage-recipe</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>ruby</category>
      <category>rspec</category>
      <category>cucumber</category>
      <category>testing</category>
      <category>tdd</category>
      <category>bdd</category>
      <category>links</category>
      <category>recipe</category>
      <category>water</category>
    </item>
    <item>
      <title>HTTParty goes foreign</title>
      <description>&lt;p&gt;Just a quick post to get share something I was tinkering with this evening.&lt;/p&gt;


	&lt;p&gt;I came across &lt;a href="http://rubybook.ca/2009/03/03/google-translation-api-with-ruby/"&gt;this post by Gerald Bauer&lt;/a&gt;, which shows you how to use the &lt;a href="http://code.google.com/apis/ajaxlanguage/documentation/reference.html"&gt;Google Translation &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; with Ruby via Net::HTTP. I thought I&amp;#8217;d play with the service with &lt;a href="http://httparty.rubyforge.org/"&gt;HTTParty&lt;/a&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;GoogleApi&lt;/span&gt;
  &lt;span class="ident"&gt;include&lt;/span&gt; &lt;span class="constant"&gt;HTTParty&lt;/span&gt;
  &lt;span class="ident"&gt;base_uri&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;ajax.googleapis.com&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.translate&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;string&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="ident"&gt;to&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="ident"&gt;from&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;en&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
    &lt;span class="ident"&gt;get&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;/ajax/services/language/translate&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:query&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;&lt;span class="symbol"&gt;:langpair&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;&lt;span class="expr"&gt;#{from}&lt;/span&gt;|&lt;span class="expr"&gt;#{to}&lt;/span&gt;&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:q&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;string&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:v&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;1.0&lt;/span&gt;&lt;span class="punct"&gt;})&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;A few examples from playing with it.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;bonjour&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;en&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;fr&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;hello&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Red wine&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;fr&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;Vin rouge&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;,&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;detectedSourceLanguage&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;en&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Where is the bathroom?&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;es&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;\302\277&lt;/span&gt;D&lt;span class="escape"&gt;\303\263&lt;/span&gt;nde est&lt;span class="escape"&gt;\303\241&lt;/span&gt; el ba&lt;span class="escape"&gt;\303\261&lt;/span&gt;o?&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;,&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;detectedSourceLanguage&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;en&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;Good morning&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;it&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;Buon giorno&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;,&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;detectedSourceLanguage&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;en&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;What a &lt;em&gt;party&lt;/em&gt;!&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;party&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;it&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;festa&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;,&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;detectedSourceLanguage&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;en&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="punct"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;GoogleApi&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;translate&lt;/span&gt;&lt;span class="punct"&gt;('&lt;/span&gt;&lt;span class="string"&gt;party&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;es&lt;/span&gt;&lt;span class="punct"&gt;')&lt;/span&gt;
&lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;{&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseData&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: {&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;translatedText&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;fiesta&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;,&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;detectedSourceLanguage&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;:&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;en&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;}, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseDetails&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: null, &lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;responseStatus&lt;span class="escape"&gt;\&amp;quot;&lt;/span&gt;: 200}&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Look how easy that was. :-)&lt;/p&gt;


	&lt;p&gt;For a previous post on using this gem, read &lt;a href="http://www.robbyonrails.com/articles/2008/11/26/the-httparty-has-just-begun"&gt;The HTTParty has just begun&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Mon, 16 Mar 2009 02:05:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:bdfa14b0-de4c-4292-b274-c86d80af7e60</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/03/16/httparty-goes-foreign</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>google</category>
      <category>translation</category>
      <category>api</category>
      <category>httparty</category>
      <category>http</category>
      <category>REST</category>
      <category>language</category>
    </item>
    <item>
      <title>The Rails Hosting Survey 2009 Survey results are in!</title>
      <description>&lt;p&gt;&lt;a href="http://rails-hosting.com"&gt;&lt;img src="http://planetargon.com/images/img_rails_hosting_survey.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;We recently &lt;a href="http://www.robbyonrails.com/articles/2009/01/13/take-the-ruby-on-rails-hosting-in-2009-survey"&gt;announced a survey&lt;/a&gt; that touched on topics related to the deployment and hosting of Ruby on Rails applications. We promised to share the results with the community and have made this information available at &lt;a href="http://rails-hosting.com"&gt;http://rails-hosting.com&lt;/a&gt;. You can download the results in &lt;span class="caps"&gt;CSV&lt;/span&gt;, PDF, and view them in &lt;span class="caps"&gt;HTML&lt;/span&gt; &lt;a href="http://rails-hosting.com"&gt;here&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Thanks again to everyone who helped us execute this survey!&lt;/p&gt;
</description>
      <pubDate>Wed, 11 Mar 2009 13:27:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1f517f02-8b33-49dd-ab19-187384a543fb</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/03/11/the-rails-hosting-survey-2009-survey-results-are-in</link>
      <category>Ruby on Rails</category>
      <category>hosting</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>survey</category>
      <category>community</category>
    </item>
    <item>
      <title>Show me your and I'll show you mine (terminal prompts with git branches)</title>
      <description>&lt;p&gt;I asked on twitter but only got a small handful of responses. So, I&amp;#8217;m taking it here.&lt;/p&gt;


	&lt;p&gt;Show me yours and I&amp;#8217;ll show you mine. Your terminal prompt that you&amp;#8217;re using. Inspire me with new ideas for my prompt.&lt;/p&gt;


	&lt;p&gt;Here is mine.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/brub7/zsh-colors"&gt;&lt;img src="http://img.skitch.com/20090213-rpb4cy7n52bmq2e5gxmf6p875f.preview.jpg" alt="zsh colors" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Now&amp;#8230; show me yours.&lt;/p&gt;
</description>
      <pubDate>Fri, 13 Feb 2009 12:57:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:84801426-f9c4-4e51-8cfa-452c19af3fb3</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/02/13/show-me-your-and-ill-show-you-mine-terminal-prompts-with-git-branches</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>terminal</category>
      <category>zsh</category>
      <category>bash</category>
      <category>colors</category>
      <category>development</category>
      <category>question</category>
    </item>
    <item>
      <title>Switch to Passenger (mod_rails) in development on OSX in less than 7 minutes or your money back!</title>
      <description>&lt;p&gt;We recently switched our default builds of &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt; to leverage the benefits of using Passenger (mod_rails) for deployment of your Ruby on Rails applications and it&amp;#8217;s been working out great for our customers. Several of our customers and colleagues mentioned that they also began using Passenger in development, which was intriguing.&lt;/p&gt;


	&lt;p&gt;But&amp;#8230; Mongrel has been working great for us for the past few years. Why switch?&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s true, I&amp;#8217;ve been happily using mongrel since it came out as a replacement to webrick back in early 2006, which makes it &lt;a href="http://www.dogyears.com"&gt;about 28 in dog years&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/191904616/" title="Nigel and I by Robby Russell, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/45/191904616_188dfe7b69.jpg" width="500" height="375" alt="Nigel and I" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;Nigel and I.. 2 1/2 years ago back when Mongrel was just a puppy&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;But&amp;#8230; over the next few weeks, I&amp;#8217;m going to evaluate Passenger in my development workflow. There&amp;#8217;s no better way to try something then to jump head first. So&amp;#8230; here goes.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/brcy4/locke"&gt;&lt;img src="http://img.skitch.com/20090211-tbjbaearkh6a18n777d1fttbij.preview.jpg" alt="locke" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;this guy was a passenger&amp;#8230;and I recently started to watch the show&lt;/small&gt;&lt;/div&gt;

	&lt;p&gt;Our team will be evaluating Passenger in our development work flow with a forthcoming blog post but if you want to get your feet wet right away, here are some instructions for setting up Passenger on &lt;span class="caps"&gt;OSX&lt;/span&gt; with PrefPane, which were &lt;a href="http://www.fngtps.com/2008/04/using-passenger-on-osx-for-rails-development"&gt;inspired by Manfred&amp;#8217;s posts&lt;/a&gt;.&lt;/p&gt;


	&lt;h2&gt;Installing Passenger via RubyGems&lt;/h2&gt;


	&lt;p&gt;To install Passenger on your &lt;span class="caps"&gt;OSX&lt;/span&gt; machine, just run the following with root credentials.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo gem install passenger&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;This will install the passenger gem on your machine. Now we need to go ahead and run a script that is provided with this gem (also with root credentials).&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo passenger-install-apache2-module&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;You&amp;#8217;ll want to follow the instructions that appear. When you see something similar to the following output from the command, you&amp;#8217;ll want to copy/paste that into an apache configuration file. I just created a file at &lt;code&gt;/etc/apache2/other/passenger.conf&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Edit this file with your editor of choice&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;mate /etc/apache2/other/passenger.conf&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Mine looks like:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  #/etc/apache2/other/passenger.conf

  # Passenger modules and configuration
  LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
  PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.6
  PassengerRuby /opt/local/bin/ruby

  # Set the default environment to development
  RailsEnv development

  # Which directory do you want Apache to be able to look into for projects?
  &amp;lt;Directory "/Users/robbyrussell/Projects/development"&amp;gt;
      Order allow,deny
      Allow from all
  &amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Once you finish running through &lt;code&gt;sudo passenger-install-apache2-module&lt;/code&gt;, you&amp;#8217;ll need to restart Apache on your workstation. This can be done by simply turning off/on Web Sharing in your Sharing Preference Pane.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/brm7c/sharing"&gt;&lt;img src="http://img.skitch.com/20090211-q8aceehkngyc2gx8m9e7818cjx.preview.jpg" alt="Sharing" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Alright, we got through the hard part. Now, in order for you to begin using Passenger, we need to setup Apache to point to your individual Ruby on Rails application(s). You can hack on Apache configuration files more, but there is an easier way thanks to the &lt;a href="http://www.fngtps.com/passenger-preference-pane"&gt;Passenger Preference Pane&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;This will manage your VHost files for you!&lt;/strong&gt;&lt;/p&gt;


	&lt;h3&gt;Setting up Preference Pane&lt;/h3&gt;


	&lt;p&gt;If you followed my post on &lt;a href="http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition"&gt;installing Ruby on Rails via MacPorts&lt;/a&gt;, you&amp;#8217;re going to need to install Ruby Cocoa, which can be done with the following. If you&amp;#8217;re using the Ruby provided from Apple, you can skip this step.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install rb-cocoa&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Once that is done, go ahead and move on and &lt;a href="http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition"&gt;download Passenger Preference Pane&lt;/a&gt;. Once downloaded, you can install the preference pane, by double-clicking on the following file.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/brm6d/passengerpane-1.2"&gt;&lt;img src="http://img.skitch.com/20090211-ekkryqi9ymt7i8efgurs5hri6i.preview.jpg" alt="PassengerPane-1.2" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;The next part is really simple as well. Just begin to add your various Ruby on Rails projects into the Preference Pane&amp;#8230; and when you&amp;#8217;re done, you should be able to run your applications over port 80 without any problems.&lt;/p&gt;


	&lt;p&gt;As you can see, I&amp;#8217;ve already setup a handful of projects and we don&amp;#8217;t have to start/stop mongrels for each one or worry about port numbers when running multiple projects. (time savings!)&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/brm61/passenger"&gt;&lt;img src="http://img.skitch.com/20090211-bdsycieq5wsuyf4bbq89mit1aq.preview.jpg" alt="Passenger" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Voila. Simple enough. You might need to stop/start Apache, couldn&amp;#8217;t remember if I needed to or not.&lt;/p&gt;


	&lt;p&gt;For each host that you add into this panel, it&amp;#8217;ll automatically be added so that you can immediately browse to http://yourhost.local and it &lt;em&gt;should&lt;/em&gt; just work. :-)&lt;/p&gt;


	&lt;h4&gt;Things to still figure out&amp;#8230;&lt;/h4&gt;


	&lt;p&gt;Debugging. If you&amp;#8217;re used to doing &lt;code&gt;--debugger&lt;/code&gt;, it appears that you can do something similar with the &lt;a href="http://github.com/ddollar/socket-debugger/tree/master"&gt;socket-debugger&lt;/a&gt; plugin. Not tried it myself, but worth looking into.&lt;/p&gt;


	&lt;p&gt;Browser testing via VMWare/Parallels/VirtualBox. Does anybody have any tips on how to best appraoch this? Our designers are curious&amp;#8230;&lt;/p&gt;


	&lt;p&gt;As I mentioned, this is day one of trying it out and managed to motivate our entire design and development team to try it with me so that we can all learn about issues together and find solutions quicker. If you&amp;#8217;ve been using this approach for a while, I&amp;#8217;d be interested in hearing your story and if there are any issues that we should be aware of.&lt;/p&gt;
</description>
      <pubDate>Wed, 11 Feb 2009 16:52:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:71fbbe02-d780-4888-8f75-76b2920720c8</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/02/11/switch-to-passenger-mod_rails-in-development-on-osx-in-less-than-7-minutes-or-your-money-back</link>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>development</category>
      <category>planetargon</category>
      <category>boxcar</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>passenger</category>
      <category>osx</category>
      <category>apache</category>
    </item>
    <item>
      <title>Rolling out new updates for Rails Boxcar</title>
      <description>&lt;p&gt;Alex, Director of Deployment Services, has been hard at work helping us get our new suite of hosting plans out for &lt;a href="http://railsboxcar.com/"&gt;Rails Boxcar&lt;/a&gt;, a deployment environment that we&amp;#8217;ve designed to help you get your Ruby on Rails applications running as painless and quickly as possible. With this new announcement, we&amp;#8217;ve rebuilt the Boxcar image based on the feedback of &lt;a href="http://railsboxcar.com/testimonials"&gt;our existing customers&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Additionally, we&amp;#8217;ve been looking over some of early results from the  &lt;a href="http://blog.planetargon.com/2009/1/13/take-the-ruby-on-rails-hosting-in-2009-survey"&gt;Ruby on Rails Hosting in 2009 Survey&lt;/a&gt; that we&amp;#8217;ve been running the past few weeks, which has further boosted our confidence that we&amp;#8217;re on the right track with this big change.&lt;/p&gt;


	&lt;p&gt;What are some of the changes?&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Moving to &lt;a href="http://www.rubyenterpriseedition.com/"&gt;Ruby Enterprise Edition&lt;/a&gt; (REE)&lt;/li&gt;
		&lt;li&gt;Moving to &lt;a href="http://www.modrails.com/"&gt;Passenger&lt;/a&gt; (mod_rails) by default&lt;/li&gt;
		&lt;li&gt;All-new pricing structure! (starting at $35/month)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;This means that with a Rails Boxcar, you can now get a pre-configured deployment environment using some of the most efficient platforms for hosting your Ruby on Rails applications. (REE has &lt;a href="http://www.rubyenterpriseedition.com/comparisons.html#overall_conclusion"&gt;shown to increase performance by 33% in some cases&lt;/a&gt;)&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re really excited about this new setup and would like to invite you all to check out our new plans and &lt;a href="http://railsboxcar.com/contact"&gt;send us any questions&lt;/a&gt; that you might have.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://railsboxcar.com/"&gt;Visit RailsBoxcar.com&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Wed, 28 Jan 2009 23:30:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ec70a607-ba4b-4c32-871c-874d1e96586c</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/28/rolling-out-new-updates-for-rails-boxcar</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PLANET ARGON</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>railsboxcar</category>
      <category>boxcar</category>
      <category>deployment</category>
      <category>hosting</category>
      <category>phusion</category>
      <category>ruby</category>
      <category>enterprise</category>
    </item>
    <item>
      <title>Rails Hosting Survey - 5 days left...</title>
      <description>&lt;p&gt;Wow. Thanks to all of you who &lt;a href="http://search.twitter.com/search?q=rails+hosting+survey"&gt;have helped get the word&lt;/a&gt; out about the Ruby on Rails Hosting 2009 Survey. We just &lt;em&gt;&lt;strong&gt;passed 900 people&lt;/strong&gt;&lt;/em&gt; and we have about five more days left to hit the 1500 milestone that I set for myself.&lt;/p&gt;


	&lt;p&gt;If you can spare five minutes to help us reach this goal, we&amp;#8217;d really appreciate it.&lt;/p&gt;


	&lt;p&gt;Here is a quick sample of the questions that we&amp;#8217;re asking the community.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Where is your source code hosted?&lt;/li&gt;
		&lt;li&gt;Which database do you typically use in production?&lt;/li&gt;
		&lt;li&gt;which performance monitoring tool do you use?&lt;/li&gt;
		&lt;li&gt;How much of your monthly budget is allocated for deployment and hosting expenses?&lt;/li&gt;
		&lt;li&gt;So, can Rails scale? ;)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Don&amp;#8217;t hesitate&amp;#8230; we only have a few days left!&lt;/p&gt;


&lt;center&gt;
&lt;a href="http://www.surveymonkey.com/s.aspx?sm=bRkqJnEzDbVmwI9PqVkSIg_3d_3d"&gt;&lt;img src="http://robbyonrails.com/files/take-the-survey.png" style="padding-top: 20px; padding-bottom: 40px;"/&gt;&lt;/a&gt;&lt;/center&gt;

	&lt;p&gt;For more information, read the original post, &lt;a href="http://www.robbyonrails.com/articles/2009/01/13/take-the-ruby-on-rails-hosting-in-2009-survey"&gt;Take the Ruby on Rails Hosting in 2009 Survey&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Tue, 27 Jan 2009 10:52:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6039ca56-55f6-4b02-83ae-d681ec81d0b9</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/27/rails-hosting-survey-5-days-left</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>hosting</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>survey</category>
      <category>community</category>
    </item>
    <item>
      <title>Rails Hosting Survey (continued)</title>
      <description>&lt;p&gt;Thanks to everyone has taken the survey and mentioned it on twitter. We just passed 400 people. We have a ways to go before we hit our goal of at least 1500 people surveyed. (if we can get even more than that&amp;#8230; great!)&lt;/p&gt;


	&lt;p&gt;The survey is taking most people less than 5 minutes to complete, so if you haven&amp;#8217;t filled it out yet and have experience deploying Ruby on Rails applications, here&amp;#8217;s a link. :-)&lt;/p&gt;


&lt;center&gt;
&lt;a href="http://www.surveymonkey.com/s.aspx?sm=bRkqJnEzDbVmwI9PqVkSIg_3d_3d"&gt;&lt;img src="http://robbyonrails.com/files/take-the-survey.png" style="padding-top: 20px; padding-bottom: 40px;"/&gt;&lt;/a&gt;&lt;/center&gt;

	&lt;p&gt;Any help that you can provide in getting the word out would be greatly appreciated.&lt;/p&gt;


	&lt;p&gt;Thanks!&lt;/p&gt;
</description>
      <pubDate>Thu, 15 Jan 2009 17:36:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:e56de3e9-3661-46ba-a66c-e86cb969f572</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/15/rails-hosting-survey-continued</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>hosting</category>
      <category>survey</category>
      <category>rubyonrails</category>
      <category>rails</category>
    </item>
    <item>
      <title>Question: Plugins or Gems? (or both?)</title>
      <description>&lt;p&gt;Our development team likes to extract reusable pieces of code for our projects and have historically used plugins. However, we are finding more and more people releasing these sorts of modules/components/patterns as gems.&lt;/p&gt;


	&lt;p&gt;Which do you prefer and why?&lt;/p&gt;


	&lt;p&gt;If you use both, how do you decide to use plugins or gems?&lt;/p&gt;
</description>
      <pubDate>Tue, 13 Jan 2009 13:56:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:0f92499a-3c3f-4257-83e4-25831d893cd5</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/13/question-plugins-or-gems-or-both</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>question</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>gems</category>
      <category>plugins</category>
    </item>
    <item>
      <title>Take the Ruby on Rails Hosting in 2009 Survey</title>
      <description>&lt;p&gt;&lt;strong&gt;Calling all Ruby on Rails developers and system administrators.&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;The team at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; is hoping to collect some information about how everyone is currently managing the deployment and hosting of their Ruby on Rails applications. We are inviting you all to participate in the &lt;a href="http://rubyurl.com/rk5Y"&gt;Rails Hosting in 2009 survey&lt;/a&gt;, which consists of nearly forty questions about you and your Rails hosting experiences. &lt;strong&gt;Most people say it is taking &lt;ins&gt;less than five (5) minutes&lt;/ins&gt; to complete it.&lt;/strong&gt; =)&lt;/p&gt;


	&lt;p&gt;We will collect responses for the survey until the end of January and will then publish the results (with anonymous raw data) for everyone in the community to share and use.&lt;/p&gt;


	&lt;p&gt;Our goal is to use this information ourselves to continue to evolve our &lt;a href="http://railsboxcar.com"&gt;hosting-related products&lt;/a&gt; and &lt;a href="http://planetargon.com/deployment-consulting"&gt;deployment services&lt;/a&gt; for you. We also want all of our fellow hosting providers and development teams to have access to this information so that they can continue to improve their services. Rails deployment and hosting is getting easier for us all, but we know that there is always room from improvement.&lt;/p&gt;


	&lt;p&gt;We make an effort to keep our ear close to the ground in the community to listen for trends and problems, but sometimes it&amp;#8217;s better to just ask directly.&lt;/p&gt;


	&lt;p&gt;So, if you have a few minutes to spare, please take the survey!&lt;/p&gt;


&lt;center&gt;
&lt;a href="http://www.surveymonkey.com/s.aspx?sm=bRkqJnEzDbVmwI9PqVkSIg_3d_3d"&gt;&lt;img src="http://robbyonrails.com/files/take-the-survey.png" style="padding-top: 20px; padding-bottom: 40px;"/&gt;&lt;/a&gt;&lt;/center&gt;

	&lt;p&gt;&lt;strong&gt;update:&lt;/strong&gt; some people mentioned that we should have made some options multi-select. it&amp;#8217;s too late to change it without losing submissions. so, for questions like: Monit, God, or Other (and you&amp;#8217;re using God &lt;strong&gt;and&lt;/strong&gt; Monit, put that in Other and we&amp;#8217;ll track them accordingly)&lt;/p&gt;


	&lt;p&gt;P.S. Please spread the word about the survey!&lt;/p&gt;
</description>
      <pubDate>Tue, 13 Jan 2009 12:40:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:663d4cee-0fd1-4947-8b6b-f08787e58251</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/13/take-the-ruby-on-rails-hosting-in-2009-survey</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PLANET ARGON</category>
      <category>hosting</category>
      <category>survey</category>
      <category>rubyonrails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Get to know a gem: Ghost</title>
      <description>&lt;p&gt;In my last post, &lt;a href="http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained"&gt;Subdomain accounts with Ruby on Rails explaind&lt;/a&gt;, I mentioned that you&amp;#8217;d need to modify your &lt;code&gt;/etc/hosts&lt;/code&gt; file to use custom subdomains for development/testing. Apparently, there is a much better way to handle this that I was introduced to by &lt;a href="http://www.atnan.com/"&gt;Nathan de Vries&lt;/a&gt;. Nathan suggests using a gem that I hadn&amp;#8217;t heard of before that bares the name of Ghost (&lt;a href="http://github.com/bjeanes/ghost/tree/master"&gt;view project on github&lt;/a&gt;).&lt;/p&gt;


	&lt;p&gt;Ghost describes itself as&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;A gem that allows you to create, list, and modify local hostnames in 10.5 with ease…&amp;#8221;&amp;#8212;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;If you&amp;#8217;ve ever had to modify your &lt;code&gt;/etc/hosts&lt;/code&gt; file for anything local, I highly encourage you to check out this shiny gem.&lt;/p&gt;


	&lt;h2&gt;Installing Ghost&lt;/h2&gt;


	&lt;p&gt;Like most gems, you can just install Ghost with the following command.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
~ : sudo gem install ghost
Password:
Successfully installed ghost-0.1.2-universal-darwin-9
1 gem installed
Installing ri documentation for ghost-0.1.2-universal-darwin-9...
Installing RDoc documentation for ghost-0.1.2-universal-darwin-9...
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Okay, now that Ghost is installed, let&amp;#8217;s see what we can do with it.&lt;/p&gt;


	&lt;h2&gt;Using Ghost for local domains/subdomains&lt;/h2&gt;


	&lt;p&gt;Ghost is fairly straight forward. It&amp;#8217;s essentially a friendly wrapper for &lt;a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dscl.1.html"&gt;dscl&lt;/a&gt;, which is the Directory Service command line utility
for Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;. I&amp;#8217;ve never played with that directly, but it seems that with Ghost&amp;#8230; I shouldn&amp;#8217;t need to. :-)&lt;/p&gt;


	&lt;p&gt;With Ghost, you can add, modify, and delete entries in the Directory Service by issuing any of the following commands. Let&amp;#8217;s start out by running &lt;code&gt;ghost&lt;/code&gt; to see what we have here.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
 ~ : ghost
USAGE: ghost add &amp;lt;hostname&amp;gt; [&amp;lt;ip=127.0.1.1&amp;gt;]
       ghost modify &amp;lt;hostname&amp;gt; &amp;lt;ip&amp;gt;
       ghost delete &amp;lt;hostname&amp;gt;
       ghost list
       ghost empty
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Okay, let&amp;#8217;s see if there is anything already listed.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   ~ : ghost list
  Listing 0 host(s):
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Nope. Let&amp;#8217;s test this out. First, we&amp;#8217;ll try to ping a domain name that we hope doesn&amp;#8217;t exist.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   ~ : ping bigbrown.cow
  ping: cannot resolve bigbrown.cow: Unknown host  
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Alright, now we&amp;#8217;ll add &lt;code&gt;bigbrown.cow&lt;/code&gt; with &lt;code&gt;ghost&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   ~ : ghost add bigbrown.cow
  Password:
    [Adding] bigbrown.cow -&amp;gt; 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;As you can see, it required root credentials to do this as it&amp;#8217;s system-wide. Let&amp;#8217;s now see if we can talk to bigbrown.cow.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   ~ : ping bigbrown.cow     
  PING bigbrown.cow (127.0.0.1): 56 data bytes
  64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.047 ms
  64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.035 ms
  ^C
  --- bigbrown.cow ping statistics ---
  2 packets transmitted, 2 packets received, 0% packet loss
  round-trip min/avg/max/stddev = 0.035/0.041/0.047/0.006 ms
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Excellent! If we run &lt;code&gt;ghost list&lt;/code&gt; again, we should see this record.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
~ : ghost list
Listing 1 host(s):
  bigbrown.cow -&amp;gt; 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;We can modify the record to a non-localhost IP as well with &lt;code&gt;ghost modify&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   ~ : ghost modify bigbrown.cow 192.168.10.104
    [Modifying] bigbrown.cow -&amp;gt; 192.168.10.104
   ~ : ghost list
  Listing 1 host(s):
    bigbrown.cow -&amp;gt; 192.168.10.104  
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I&amp;#8217;ll let you play with it yourself as there isn&amp;#8217;t much to it. This is a great little addition to my development environment. Thanks to Nathan for pointing it out and to &lt;a href="http://github.com/bjeanes"&gt;Bodaniel Jeanes&lt;/a&gt; for creating this useful gem.&lt;/p&gt;
</description>
      <pubDate>Mon, 12 Jan 2009 00:18:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:df6df9ad-a49c-4677-a44c-fe457e31cc36</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/12/get-to-know-a-gem-ghost</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>gem</category>
      <category>ghost</category>
      <category>dns</category>
      <category>development</category>
      <category>rubygems</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Subdomain accounts with Ruby on Rails explained</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt; recently posted, &lt;a href="http://www.37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails"&gt;How to do Basecamp-style subdomains in Rails&lt;/a&gt; on SvN and it just happens that I was implementing some similar stuff this last week for a project we&amp;#8217;re developing internally.&lt;/p&gt;


	&lt;p&gt;In our project, not everything needs to be scoped per-account as we are building a namespace for administrators of the application and also want a promotional site for the product. Three different interfaces, with some overlap between them all.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s walk through a few quick steps that you can follow to setup the two interfaces within the same application.&lt;/p&gt;


	&lt;p&gt;Suppose that we&amp;#8217;re going to build a new web-based product and have the following requirements initially.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;We need a promotional site for sign-ups, frequently-asked-questions, support requests, etc.&lt;/li&gt;
		&lt;li&gt;When people sign-up for an account, they&amp;#8217;ll should have their own unique sub-domain&lt;/li&gt;
		&lt;li&gt;There are two different visual layouts (promotional site and the account)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Note: I use RSpec and am going to skip the &lt;span class="caps"&gt;TDD&lt;/span&gt; process here and let you conquer that for yourself. Am using the default Rails commands in this tutorial.&lt;/p&gt;


	&lt;h2&gt;Account model / Database&lt;/h2&gt;


	&lt;p&gt;We&amp;#8217;re going to generate a new model for Account, which will be responsible for scoping sub-domains and individual accounts.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;account&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;demo&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;ruby&lt;/span&gt; &lt;span class="ident"&gt;script&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;generate&lt;/span&gt; &lt;span class="ident"&gt;model&lt;/span&gt; &lt;span class="constant"&gt;Account&lt;/span&gt; &lt;span class="ident"&gt;subdomain&lt;/span&gt;&lt;span class="symbol"&gt;:string&lt;/span&gt; 
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;test&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;unit&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;test&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;fixtures&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;app&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;models&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;test&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;unit&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;account_test&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;test&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;fixtures&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;accounts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;yml&lt;/span&gt;
       &lt;span class="ident"&gt;exists&lt;/span&gt;  &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;migrate&lt;/span&gt;
       &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;migrate&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="number"&gt;20090111220627_&lt;/span&gt;&lt;span class="ident"&gt;create_accounts&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Great, let&amp;#8217;s migrate our application.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;   &lt;span class="ident"&gt;account&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;demo&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;rake&lt;/span&gt; &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="symbol"&gt;:migrate&lt;/span&gt;
  &lt;span class="punct"&gt;==&lt;/span&gt;  &lt;span class="constant"&gt;CreateAccounts&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;migrating&lt;/span&gt; &lt;span class="punct"&gt;=================================================&lt;/span&gt;
  &lt;span class="punct"&gt;--&lt;/span&gt; &lt;span class="ident"&gt;create_table&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:accounts&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
     &lt;span class="punct"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;0.0045&lt;/span&gt;&lt;span class="ident"&gt;s&lt;/span&gt;
  &lt;span class="punct"&gt;==&lt;/span&gt;  &lt;span class="constant"&gt;CreateAccounts&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;migrated&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;0.0052&lt;/span&gt;&lt;span class="ident"&gt;s&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;========================================&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Before we get too far, let&amp;#8217;s make sure that we&amp;#8217;re adding an index on this table for the subdomain, as it&amp;#8217;ll improve performance in the database as the subdomain will used in &lt;span class="caps"&gt;SQL&lt;/span&gt; conditions quite often.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;account&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;demo&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;ruby&lt;/span&gt; &lt;span class="ident"&gt;script&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;generate&lt;/span&gt; &lt;span class="ident"&gt;migration&lt;/span&gt; &lt;span class="constant"&gt;AddIndexToAccountSubdomain&lt;/span&gt;
     &lt;span class="ident"&gt;exists&lt;/span&gt;  &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;migrate&lt;/span&gt;
     &lt;span class="ident"&gt;create&lt;/span&gt;  &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;migrate&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="number"&gt;20090111221009_&lt;/span&gt;&lt;span class="ident"&gt;add_index_to_account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;rb&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Let&amp;#8217;s open up this new migration file and toss in a &lt;span class="caps"&gt;UNIQUE INDEX&lt;/span&gt; on &lt;code&gt;subdomain&lt;/code&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;AddIndexToAccountSubdomain&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Migration&lt;/span&gt;
    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.up&lt;/span&gt;
      &lt;span class="ident"&gt;add_index&lt;/span&gt; &lt;span class="symbol"&gt;:accounts&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:unique&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.down&lt;/span&gt;
      &lt;span class="ident"&gt;remove_index&lt;/span&gt; &lt;span class="symbol"&gt;:accounts&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Okay, let&amp;#8217;s migrate this bad boy.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;   &lt;span class="ident"&gt;account&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;demo&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;rake&lt;/span&gt; &lt;span class="ident"&gt;db&lt;/span&gt;&lt;span class="symbol"&gt;:migrate&lt;/span&gt;
  &lt;span class="punct"&gt;==&lt;/span&gt;  &lt;span class="constant"&gt;AddIndexToAccountSubdomain&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;migrating&lt;/span&gt; &lt;span class="punct"&gt;=====================================&lt;/span&gt;
  &lt;span class="punct"&gt;--&lt;/span&gt; &lt;span class="ident"&gt;add_index&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:accounts&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;&lt;span class="symbol"&gt;:unique=&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;span class="constant"&gt;true&lt;/span&gt;&lt;span class="punct"&gt;})&lt;/span&gt;
     &lt;span class="punct"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="number"&gt;0.0047&lt;/span&gt;&lt;span class="ident"&gt;s&lt;/span&gt;
  &lt;span class="punct"&gt;==&lt;/span&gt;  &lt;span class="constant"&gt;AddIndexToAccountSubdomain&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="ident"&gt;migrated&lt;/span&gt; &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="number"&gt;0.0050&lt;/span&gt;&lt;span class="ident"&gt;s&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;============================&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Great, we&amp;#8217;re now ready to move on to the fun stuff.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s open up &lt;code&gt;app/models/account.rb&lt;/code&gt; and throw some sugar in it.&lt;/p&gt;


	&lt;h3&gt;Data Validation&lt;/h3&gt;


	&lt;p&gt;Because we&amp;#8217;re going to be dealing with subdomains, we need to make sure that we&amp;#8217;re only allowing people to sign-up with valid data otherwise, there could be issues. URLs need to fit within certain conventions and we need to make it as graceful as possible for our customers.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s make a quick list of what we need to enforce for the &lt;code&gt;subdomain&lt;/code&gt; attributes. This can easily be expanded, but let&amp;#8217;s cover the basics.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Each account should have a &lt;code&gt;subdomain&lt;/code&gt; &lt;/li&gt;
		&lt;li&gt;Each &lt;code&gt;subdomain&lt;/code&gt; should be unique within the application&lt;/li&gt;
		&lt;li&gt;A &lt;code&gt;subdomain&lt;/code&gt; should be alpha-numeric with no characters or spaces with the exception of a dash (my requirement)&lt;/li&gt;
		&lt;li&gt;A &lt;code&gt;subdomain&lt;/code&gt; should be stored as lowercase&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;So, let&amp;#8217;s update the following default Account model&amp;#8230;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Account&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;..and add some basic validations.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Account&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
    &lt;span class="ident"&gt;validates_presence_of&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;
    &lt;span class="ident"&gt;validates_format_of&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:with&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="regex"&gt;^[A-Za-z0-9-]+$&lt;/span&gt;&lt;span class="punct"&gt;/,&lt;/span&gt; &lt;span class="symbol"&gt;:message&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;The subdomain can only contain alphanumeric characters and dashes.&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="symbol"&gt;:allow_blank&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt;
    &lt;span class="ident"&gt;validates_uniqueness_of&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:case_sensitive&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;false&lt;/span&gt;

    &lt;span class="ident"&gt;before_validation&lt;/span&gt; &lt;span class="symbol"&gt;:downcase_subdomain&lt;/span&gt;

    &lt;span class="ident"&gt;protected&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;downcase_subdomain&lt;/span&gt;
        &lt;span class="constant"&gt;self&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;subdomain&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;downcase!&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;attribute_present?&lt;/span&gt;&lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;subdomain&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;h4&gt;Reserved subdomains&lt;/h4&gt;


	&lt;p&gt;In the project that our team is working on, we wanted to reserve several subdomains so that we could use them later on. We tossed in the following validation as well.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;validates_exclusion_of&lt;/span&gt; &lt;span class="symbol"&gt;:subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:in&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;%w(&lt;/span&gt;&lt;span class="string"&gt; support blog www billing help api &lt;/span&gt;&lt;span class="punct"&gt;),&lt;/span&gt; &lt;span class="symbol"&gt;:message&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;The subdomain &amp;lt;strong&amp;gt;{{value}}&amp;lt;/strong&amp;gt; is reserved and unavailable.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;This will prevent people from using those when they sign up.&lt;/p&gt;


	&lt;h3&gt;Controller / Handling Requests&lt;/h3&gt;


	&lt;p&gt;Let&amp;#8217;s now think about how we&amp;#8217;ll handle requests so that we can scope the application to the current account when a subdomain is being referenced in the &lt;span class="caps"&gt;URL&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;For example, let&amp;#8217;s say that our application is going to be: &lt;code&gt;http://purplecowapp.com/&lt;/code&gt; [1]&lt;/p&gt;


	&lt;p&gt;Customers will get to sign-up and reserve &lt;code&gt;http://customer-name.purplecowapp.com/&lt;/code&gt;. I want my account subdomain to be &lt;code&gt;green.purplecowapp.com&lt;/code&gt; and everything under this subdomain should be related to my instance of the application.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve begun working on my own module, which is inspired mostly by &lt;a href="http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb"&gt;the account_location plugin&lt;/a&gt; with some additions to meet some of our product&amp;#8217;s requirements.&lt;/p&gt;


	&lt;p&gt;Here is my attempt to simplify it for you (removed some other project-specific references) and &lt;a href="http://gist.github.com/45826"&gt;have put this into a Gist for you&lt;/a&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="comment"&gt;#&lt;/span&gt;
  &lt;span class="comment"&gt;# Inspired by&lt;/span&gt;
  &lt;span class="comment"&gt;# http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb&lt;/span&gt;
  &lt;span class="comment"&gt;#&lt;/span&gt;
  &lt;span class="keyword"&gt;module &lt;/span&gt;&lt;span class="module"&gt;SubdomainAccounts&lt;/span&gt;
    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;self.included&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="ident"&gt;controller&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
      &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;helper_method&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:account_domain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:account_url&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:current_account&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:default_account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:default_account_url&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="ident"&gt;protected&lt;/span&gt;

      &lt;span class="comment"&gt;# TODO: need to handle www as well&lt;/span&gt;
      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;default_account_subdomain&lt;/span&gt;
        &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;account_url&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="ident"&gt;account_subdomain&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;default_account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="ident"&gt;use_ssl&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;ssl?&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
        &lt;span class="ident"&gt;http_protocol&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;use_ssl&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="ident"&gt;account_host&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;account_host&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="ident"&gt;subdomain&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
        &lt;span class="ident"&gt;account_host&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
        &lt;span class="ident"&gt;account_host&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;subdomain&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;.&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
        &lt;span class="ident"&gt;account_host&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;account_domain&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;account_domain&lt;/span&gt;
        &lt;span class="ident"&gt;account_domain&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
        &lt;span class="ident"&gt;account_domain&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;domain&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;port_string&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;account_subdomain&lt;/span&gt;
        &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;subdomains&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;first&lt;/span&gt; &lt;span class="punct"&gt;||&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;default_account_url&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="ident"&gt;use_ssl&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;ssl?&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
        &lt;span class="ident"&gt;http_protocol&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;use_ssl&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;+&lt;/span&gt; &lt;span class="ident"&gt;account_domain&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;current_account&lt;/span&gt;
        &lt;span class="constant"&gt;Account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find_by_subdomain&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;account_subdomain&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;

      &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;http_protocol&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="ident"&gt;use_ssl&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;request&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;ssl?&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
        &lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;use_ssl&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;https://&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;http://&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;)&lt;/span&gt;
      &lt;span class="keyword"&gt;end&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;&lt;a href="http://gist.github.com/45826"&gt;View gist here&lt;/a&gt; (embed wasn&amp;#8217;t working right when I tried)&lt;/p&gt;


	&lt;p&gt;Just include this into your &lt;code&gt;lib/&lt;/code&gt; directory and &lt;code&gt;require&lt;/code&gt; it in &lt;code&gt;config/environment.rb&lt;/code&gt;. (if people think it&amp;#8217;s worth moving into a plugin, I could do that)&lt;/p&gt;


	&lt;h4&gt;Including AccountSubdomains&lt;/h4&gt;


	&lt;p&gt;In the main application controller (&lt;code&gt;app/controllers/application.rb&lt;/code&gt;), just include this submodule.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
    &lt;span class="ident"&gt;include&lt;/span&gt; &lt;span class="constant"&gt;SubdomainAccounts&lt;/span&gt;

    &lt;span class="punct"&gt;...&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Now, we&amp;#8217;ll want to add a check to verify that the requested subdomain is a valid account. (our code also checks for status on paid memberships, etc&amp;#8230; but I&amp;#8217;ll just show a basic version without that)&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s add in the following to &lt;code&gt;app/controllers/application.rb&lt;/code&gt;. This will only check on the status of the account (via subdomain) if the current subdomain is not the default. For example: &lt;code&gt;purplecowapp.com&lt;/code&gt; is just our promotion site, so we won&amp;#8217;t look up the account status and/or worry about the subdomain. Otherwise, we&amp;#8217;ll check on the status.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="ident"&gt;before_filter&lt;/span&gt; &lt;span class="symbol"&gt;:check_account_status&lt;/span&gt;

  &lt;span class="ident"&gt;protected&lt;/span&gt;
    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;check_account_status&lt;/span&gt;
      &lt;span class="keyword"&gt;unless&lt;/span&gt; &lt;span class="ident"&gt;account_subdomain&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="ident"&gt;default_account_subdomain&lt;/span&gt;
        &lt;span class="comment"&gt;# TODO: this is where we could check to see if the account is active as well (paid, etc...)&lt;/span&gt;
        &lt;span class="ident"&gt;redirect_to&lt;/span&gt; &lt;span class="ident"&gt;default_account_url&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;current_account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;nil?&lt;/span&gt; 
      &lt;span class="keyword"&gt;end&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;h4&gt;Current Account meets Project model&lt;/h4&gt;


	&lt;p&gt;When requests are made to an account&amp;#8217;s subdomain, we want to be able to scope our controller actions.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;WARNING&lt;/span&gt;&lt;/strong&gt;: I&amp;#8217;m going to gloss over the following steps because this is just standard Rails development stuff and I want to focus on how to scope your Rails code to account subdomains.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll just say that this product gives each account many projects to do stuff within. I&amp;#8217;ll assume that you&amp;#8217;ll know how to handle all that and we&amp;#8217;ll assume you have a Project model already.&lt;/p&gt;


	&lt;p&gt;What you will need is to add a foreign key to your table (projects in this example) that references Account. So, make sure that your model has an &lt;code&gt;account_id&lt;/code&gt; attribute with and that the database table column has an &lt;span class="caps"&gt;INDEX&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ll add our associations in the models so that they can reference each other.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="comment"&gt;# app/models/account.rb&lt;/span&gt;
  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Account&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
    &lt;span class="ident"&gt;has_many&lt;/span&gt; &lt;span class="symbol"&gt;:projects&lt;/span&gt;
    &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="comment"&gt;# app/models/project.rb&lt;/span&gt;
  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Project&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
    &lt;span class="ident"&gt;belongs_to&lt;/span&gt; &lt;span class="symbol"&gt;:account&lt;/span&gt;
    &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Okay great&amp;#8230; back to our controllers. The SubdomainAccounts module provides you with the &lt;code&gt;current_account&lt;/code&gt; variable, which you can use within your controllers/views. This allows us to do the following in our controllers. For example, if we had a ProjectsController.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;  &lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ProjectsController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ApplicationController&lt;/span&gt;
    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;index&lt;/span&gt;
      &lt;span class="attribute"&gt;@projects&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;current_account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;projects&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="symbol"&gt;:all&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;new&lt;/span&gt;
      &lt;span class="attribute"&gt;@project&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;current_account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;projects&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt; 

    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;show&lt;/span&gt;
      &lt;span class="attribute"&gt;@project&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;current_account&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;projects&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;find&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="ident"&gt;params&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:id&lt;/span&gt;&lt;span class="punct"&gt;])&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;See, this wasn&amp;#8217;t so hard, was it?&lt;/p&gt;


	&lt;h2&gt;Handling layouts&lt;/h2&gt;


	&lt;p&gt;I wanted to highlight one other thing here because I suspect that most projects that fit this will likely need a promotional/resource site where people will sign-up from. In our application, we have two application layouts. One for the main application that customers will interact with via their subdomain and the promotional site layout.&lt;/p&gt;


	&lt;p&gt;The default layout is just &lt;code&gt;app/views/layouts/application.html.erb&lt;/code&gt; and we have our promotional site layout at &lt;code&gt;app/views/layouts/promo_site.html.erb&lt;/code&gt;. A few of our controllers are specifically for the promotional site while the rest are for the application itself and in some cases, there is some overlap down to individual action within a controller.&lt;/p&gt;


	&lt;p&gt;What we did was add a few more before filters to our application controller to a) define the proper layout to render, and b) skip login_required on the promo site.&lt;/p&gt;


	&lt;p&gt;To have the proper layout get rendered, we&amp;#8217;re just checking whether the current request was made to the promotional site or not.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="ident"&gt;layout&lt;/span&gt; &lt;span class="symbol"&gt;:current_layout_name&lt;/span&gt; &lt;span class="comment"&gt;# sets the proper layout, for promo_site or application&lt;/span&gt;

&lt;span class="ident"&gt;protected&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;promo_site?&lt;/span&gt;
    &lt;span class="ident"&gt;account_subdomain&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="ident"&gt;default_account_subdomain&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;current_layout_name&lt;/span&gt;
    &lt;span class="ident"&gt;promo_site?&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;promo_site&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;application&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="comment"&gt;# ...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Our application is using Restful Authentication and we just want to check to see if the current request is made to the promotional site or not. If it is, we&amp;#8217;ll skip the &lt;code&gt;login_required&lt;/code&gt; filter. Let&amp;#8217;s assume that you have the following before_filter set.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="comment"&gt;# ...&lt;/span&gt;
  &lt;span class="ident"&gt;before_filter&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We&amp;#8217;ll just change this to:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;ApplicationController&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActionController&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
  &lt;span class="comment"&gt;# ..&lt;/span&gt;
  &lt;span class="ident"&gt;before_filter&lt;/span&gt; &lt;span class="symbol"&gt;:check_if_login_is_required&lt;/span&gt; 

  &lt;span class="ident"&gt;protected&lt;/span&gt;
    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;promo_site?&lt;/span&gt;
      &lt;span class="ident"&gt;account_subdomain&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="ident"&gt;default_account_subdomain&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;current_layout_name&lt;/span&gt;
      &lt;span class="ident"&gt;promo_site?&lt;/span&gt; &lt;span class="punct"&gt;?&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;promo_site&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;application&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;    

    &lt;span class="keyword"&gt;def &lt;/span&gt;&lt;span class="method"&gt;check_if_login_is_required&lt;/span&gt;
      &lt;span class="ident"&gt;login_required&lt;/span&gt; &lt;span class="keyword"&gt;unless&lt;/span&gt; &lt;span class="ident"&gt;promo_site?&lt;/span&gt;
    &lt;span class="keyword"&gt;end&lt;/span&gt;

    &lt;span class="comment"&gt;# ...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;There we go. We can now render the proper layout given the request and only handle authentication when necessary.&lt;/p&gt;


	&lt;h2&gt;Development with account subdomains&lt;/h2&gt;


	&lt;p&gt;When you begin developing an application like this, you need to move beyond using &lt;code&gt;http://locahost:3000&lt;/code&gt; as we need to be able to develop and test with subdomains. You can open up your &lt;code&gt;/etc/hosts&lt;/code&gt; (within a Unix-based O/S) file and add the following.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
127.0.0.1 purplecowapp.dev
127.0.0.1 green.purplecowapp.dev
127.0.0.1 sample.purplecowapp.dev
127.0.0.1 planetargon.purplecowapp.dev
127.0.0.1 lollipops.purplecowapp.dev
127.0.0.1 help.purplecowapp.dev
127.0.0.1 support.purplecowapp.dev
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;After you edit that file (with root permissions), you can flush your dns cache with &lt;code&gt;dscacheutil -flushcache&lt;/code&gt; (Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;). This will let you make requests to &lt;code&gt;http://purplecowapp.dev:3000/&lt;/code&gt; and &lt;code&gt;http://green.purplecowapp.dev:3000&lt;/code&gt;. This is a convention that our team has begun using for our own projects (TLD ending in &lt;code&gt;.dev&lt;/code&gt;). It&amp;#8217;s important to remember that the subdomain must be specified here in order to work for local requests. Unfortunately, hosts files don&amp;#8217;t support wildcards (&amp;#8217;*&amp;#8217;).&lt;/p&gt;


	&lt;h3&gt;Update&lt;/h3&gt;


	&lt;p&gt;You can also use Ghost, which is a gem for managing &lt;span class="caps"&gt;DNS&lt;/span&gt; entries locally with Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;. Read &lt;a href="http://www.robbyonrails.com/articles/2009/01/12/get-to-know-a-gem-ghost"&gt;Get to know a gem: Ghost&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;Summary&lt;/h2&gt;


	&lt;p&gt;I know that I glossed over some sections, but was hoping that the code itself would be the most beneficial for you. Feel free to leave any questions and/or provide some feedback on our approach. Perhaps you have some suggestions that I could incorporate into this so that we can improve on this pattern.&lt;/p&gt;


	&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; yeah, I&amp;#8217;ve been reading more Seth Godin recently&amp;#8230;&lt;/p&gt;
</description>
      <pubDate>Sun, 11 Jan 2009 17:30:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:17655113-8e27-436e-b246-1677382e0746</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>development</category>
      <category>code</category>
      <category>accounts</category>
      <category>subdomains</category>
      <category>database</category>
      <category>rubyonrails</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>example</category>
    </item>
    <item>
      <title>Rails and Business in the 2009 World</title>
      <description>&lt;p&gt;The past few months have been difficult for many companies and as a result, some have had layoffs and now there are developers out there looking for new opportunities. I&amp;#8217;ve received a few emails from friends and acquaintances in the Ruby on Rails community from people who are hoping to make it as a freelancer until another opportunity comes along. Questions ranging from hourly rates to managing clients has come up. I&amp;#8217;m more than happy to offer people advice on this front but always try to invite them to solicit ideas and feedback from a larger group of people. We just happen to have an open forum for all of you that are interested in discussing business-related topics.&lt;/p&gt;


	&lt;p&gt;Two years ago, I started the &lt;a href="http://groups.google.com/group/rails-business?pli=1"&gt;Ruby on Rails meets the business world&lt;/a&gt; group on Google, which currently consists of nearly 900 members.&lt;/p&gt;


	&lt;p&gt;So, if you&amp;#8217;re an entrepreneur and looking to engage with other business owners, freelancers, or to just listen in on the discussions out of curiosity, don&amp;#8217;t hesitate to &lt;a href="http://groups.google.com/group/rails-business/subscribe"&gt;join the group&lt;/a&gt;. There are several of us that would love to share our experiences/lessons with you and also learn from others.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;d invite you all to &lt;a href="http://groups.google.com/group/rails-business/topics"&gt;check out the discussion archives&lt;/a&gt; and start a dialogue with us.&lt;/p&gt;


	&lt;p&gt;...and as always, if you&amp;#8217;re not ready for a bigger group, feel free to &lt;a href="mailto:robby@planetargon.com"&gt;drop me a line personally&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Sat, 10 Jan 2009 21:11:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:35835979-745b-4fc4-8124-d889b59a0624</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2009/01/10/rails-and-business-in-the-2009-world</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
    </item>
    <item>
      <title>Rails 3 and Merb</title>
      <description>&lt;p&gt;So&amp;#8230; Rails and Merb are going to be merged into Rails 3. (&lt;a href="http://feeds.feedburner.com/~r/RidingRails/~3/493415973/merb-gets-merged-into-rails-3"&gt;link&lt;/a&gt;)&lt;/p&gt;


	&lt;p&gt;Has hell frozen over?&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://farm4.static.flickr.com/3152/3131322410_eae8821c6f.jpg?v=0" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;&lt;small&gt;(it has in Portland the last week)&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m curious about how the revised core team will incorporate the library-agnostic view points into Rails without increasing the complexity for configuration. For example, being able to use a different &lt;span class="caps"&gt;ORM&lt;/span&gt; is great, but at the same time, one of the things that I have really liked about Ruby on Rails was that it did make decisions ahead of time for you. Conventions over Configuration and all that jazz. While they intend to keep these &lt;em&gt;defaults&lt;/em&gt;, I really wonder how much more configuration will be involved. Be that as it may, Rails and Merb are run by some of the best developers I&amp;#8217;ve ever known&amp;#8230; so I am sure these decisions will not be made without some deep consideration.&lt;/p&gt;


	&lt;p&gt;Rails application don&amp;#8217;t all look and smell the same, but it&amp;#8217;s nice to know that there is consistency across all of our client applications. What I&amp;#8217;m concerned about (from an efficiency standpoint) is that this could lead to project-diversity at the cost of experimenting. Pre-Rails, the development teams that I was a part of was constantly trying out new libraries from client project to project, but this came at a huge cost. We weren&amp;#8217;t able to leverage our experience with previous projects like our team does with Ruby on Rails currently. (hell, I even helped write two different ORMs in the two years before Rails for &lt;span class="caps"&gt;PHP&lt;/span&gt;&amp;#8230; and still wasn&amp;#8217;t satisfied)&lt;/p&gt;


	&lt;p&gt;But, this isn&amp;#8217;t so much a technical problem as much as a people problem. The thing is&amp;#8230; is that Rails helped solve a people problem with a technical answer. Having testing, consistency, and other best practices built-in did the world a huge favor. ...and all it took was someone like &lt;span class="caps"&gt;DHH&lt;/span&gt; to throw his opinion out there and stick to it. It took me nearly a full year to really embrace a lot of these conventions, but in the end.. it paid off.&lt;/p&gt;


	&lt;p&gt;While I do feel that it&amp;#8217;s in developers best interests to try out new approaches, I just don&amp;#8217;t think it should be on your clients dime. This was part of the reason why I quit my last job to start Planet Argon full-time. I really wanted to get away from that cycle.&lt;/p&gt;


	&lt;p&gt;Since we (Planet Argon) adopted Ruby on Rails four years ago, we&amp;#8217;ve been able to build off of every project we had worked on before. We since adopted things like RSpec and JQuery, but our team decided on these changes after someone took the initiative to experiment with these on internal and personal projects. Having this foundation has freed up a lot of our time to focus on other issues as a team, like Interaction Design, Usability, and client collaboration.&lt;/p&gt;


	&lt;p&gt;As far as Merb itself, I honestly haven&amp;#8217;t tried to do anything with it since about 0.2/0.3. I gave up quickly though because the documentation didn&amp;#8217;t help me get anywhere and my time is valuable. I&amp;#8217;ve since seen that documentation has improved drastically, but I haven&amp;#8217;t been able to prioritize the time needed to really play with it. With Merb being merged into Rails 3, it means that I really should spend more time exploring it as we might be able to leverage some of it&amp;#8217;s benefits without as much of an investment.&lt;/p&gt;


	&lt;p&gt;Much of the lack of great interest in Merb was because I felt Rails had consistently provided our team with a solid foundation for a majority of our internal and client applications. The old saying, &amp;#8220;if it ain&amp;#8217;t broke, don&amp;#8217;t fix it.&amp;#8221; Not to say that others haven&amp;#8217;t expressed a lot of excitement about Merb and it&amp;#8217;s benefits, I just didn&amp;#8217;t see there being enough of a productivity gain to warrant the time investment required to really learn and use a new framework&amp;#8230; and the one thing that I have had trouble with was that it didn&amp;#8217;t sound like Merb encouraged a default set of libraries. I could be totally wrong, but that&amp;#8217;s been the perception I&amp;#8217;ve had based on how it was branded.&lt;/p&gt;


	&lt;p&gt;But&amp;#8230; the best part about this for you, me, and the Rails community? Is that I don&amp;#8217;t need to register &lt;strong&gt;robbyonmerb.com&lt;/strong&gt; anytime soon. ;-)&lt;/p&gt;


	&lt;p&gt;I hope that you&amp;#8217;re all having a great end to 2008 and am excited to see all the energy in the Ruby/Rails/Merb community. I suspect that between these two (now-merged) teams, we&amp;#8217;ll have an even better platform to develop web applications on. I believe this is great news and I&amp;#8217;m all in favor of seeing the Ruby community conquer these challenges that lay ahead.&lt;/p&gt;


	&lt;p&gt;Anyhow, I&amp;#8217;m just thinking out loud. What are your thoughts?&lt;/p&gt;
</description>
      <pubDate>Tue, 23 Dec 2008 16:55:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:78fde34a-ecbf-49b4-bf15-6583ad315b30</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/12/23/rails-3-and-merb</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>rails</category>
      <category>rubyonrails</category>
      <category>merb</category>
      <category>thoughts</category>
      <category>hell</category>
      <category>portland</category>
    </item>
    <item>
      <title>RailsBoxcar.com 2.0</title>
      <description>&lt;p&gt;In case you missed the tweet from &lt;a href="http://twitter.com/demonbane"&gt;Alex&lt;/a&gt; ...&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/6561/twitterrific"&gt;&lt;img src="http://img.skitch.com/20081218-jnd6arttbqttqwid2j1ts95gap.preview.jpg" alt="Twitterrific" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Our team just designed, developed, and deployed a new site for, &lt;a href="http://railsboxcar.com"&gt;Boxcar&lt;/a&gt;, our streamlined deployment environment for Ruby on Rails applications.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://railsboxcar.com/"&gt;&lt;img src="http://img.skitch.com/20081218-86i6999q9t1r5i5wegfj14m6fx.preview.jpg" alt="Boxcar" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Feel free to &lt;a href="http://railsboxcar.com/tour"&gt;take a tour&lt;/a&gt; to learn more about our product plans, which currently start as low as $59/month.&lt;/p&gt;


	&lt;p&gt;If you have a project that you&amp;#8217;ll be launching in the coming months, &lt;a href="http://railsboxcar.com/contact"&gt;get in touch with us&lt;/a&gt;. :-)&lt;/p&gt;
</description>
      <pubDate>Wed, 17 Dec 2008 23:55:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:9689b7c0-db5a-4358-babb-102474439be0</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/12/17/railsboxcar-com-2-0</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>hosting</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>vps</category>
      <category>boxcar</category>
      <category>design</category>
      <category>deployment</category>
    </item>
    <item>
      <title>Launching Ruby on Rails projects, a checklist</title>
      <description>&lt;div class="warning"&gt;
Since publishing this article, I have given a talk on this topic at Rails Underground 2009. I invite you to &lt;a href="http://www.robbyonrails.com/articles/2009/07/24/slides-from-my-rails-underground-2009-talk"&gt;checkout the slides&lt;/a&gt;.
&lt;/div&gt;

	&lt;p&gt;As mentioned in a &lt;a href="http://www.robbyonrails.com/articles/2008/12/12/alphaclone-on-postgresql-and-ruby-on-rails"&gt;recent post&lt;/a&gt;, I&amp;#8217;m hoping to share some lessons that were learned throughout the process of launching a client project. Over the past few years, we&amp;#8217;ve been part of several dozen client projects and the big launch date is always an anxiety-filled, yet exciting point for the client and our team. I wanted to provide a quick list of a few the things that our team considers vital before launching that next big project. While most of these things might seem obvious, it&amp;#8217;s still good to cover the basics and I hope a few people find it helpful.&lt;/p&gt;


	&lt;h2&gt;Hosting&lt;/h2&gt;


	&lt;p&gt;Our company has been offering &lt;a href="http://www.planetargon.com/hosting.html"&gt;Ruby on Rails hosting&lt;/a&gt; for nearly four years and a few years longer with the &lt;span class="caps"&gt;PHP5&lt;/span&gt; and &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt; world. Given that, we&amp;#8217;ve seen customers come to us at the last minute before they launch and wanting to get things setup and deployed right away. Quite often, this is their first experience deploying a Ruby on Rails application and there has historically been a semi-steep learning curve to do this. It&amp;#8217;s really encouraged that you get this stuff figured out ahead of time. If you&amp;#8217;re lucky, some hosting companies might offer cheaper plans so that you can begin to get things setup a few months or ahead of time and upgrade your plan prior to the big launch. This is how our &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt; hosting plans work.&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;ve seen a lot of customers avoid engaging with a hosting company more than a week or two before their launch because they want to reduce their monthly expenses, but the reality is that if you end up saving yourself a few hours of work by not scrambling at the last minute to get things setup, the hosting costs will pay for themselves. Several of our customers have learned this the hard way and as a result, this has resulted in extra stress that might have been avoidable if things had been ready earlier on.&lt;/p&gt;


	&lt;p&gt;The basic process that our team is to get a &lt;em&gt;real&lt;/em&gt; deployment environment setup as early in the design and development process as possible. Often times, this will be 4-6 months before launch on larger projects. In our process, we aim to have a staging environment that mirrors our production environment. We tend to use a &lt;a href="http://railsboxcar.com"&gt;Boxcar Lite&lt;/a&gt; plan for our own client projects and get the deployment process working and automated. When it&amp;#8217;s time to launch, we can easily upgrade the Boxcars with more resources to one or more Plus plans.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re in the market for a hosting company, do keep us in mind, but if we can offer any advice, be sure to find out how you can scale upwards to meet your initial 3-6 month growth targets. Don&amp;#8217;t worry about planning too far ahead in the future, until you see how traffic picks up and how the application and databases perform, you&amp;#8217;ll be spending a lot of time guessing without data. If you&amp;#8217;re new to this and aren&amp;#8217;t sure, I&amp;#8217;d encourage you to speak with a &lt;a href="http://www.planetargon.com/deployment-consulting"&gt;Ruby on Rails deployment specialist&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;A few things to consider here:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Get your &lt;a href="http://capify.org"&gt;Capistrano&lt;/a&gt; or Vlad deployment tasks setup early. Make sure everything works and set it up to work with multiple deployment environments. (staging, production, etc.)
	&lt;ul&gt;
	&lt;li&gt;Use &lt;a href="http://www.robbyonrails.com/articles/2008/04/15/boxcar-conductor-rails-deployment-made-easy"&gt;Boxcar Conductor&lt;/a&gt; with your Rails Boxcar. (&lt;a href="http://github.com/planetargon/boxcar-conductor/tree/master"&gt;Boxcar Conductor on github&lt;/a&gt;)&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Use the &lt;strong&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt; Basic Authentication&lt;/strong&gt;, which is available in Ruby on Rails to keep peeping toms (competitors, search crawlers, spammers, etc.. ) out of your project while you&amp;#8217;re deploying to your staging environment. We tend to give out a &lt;code&gt;.htaccess&lt;/code&gt; user/pass with this method to the stakeholders so they can access the site whenver they need to.
	&lt;ul&gt;
	&lt;li&gt;Rails documentation on &lt;span class="caps"&gt;HTTP&lt;/span&gt; Basic Authentication: &lt;a href="http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html"&gt;view docs&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Watch a Railscast for using &lt;span class="caps"&gt;HTTP&lt;/span&gt; Basic Authentication: &lt;a href="http://railscasts.com/episodes/82"&gt;watch screencast&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Get your automated tasks (cron jobs) setup way before launch. Verify that things are working here at the right times
	&lt;ul&gt;
	&lt;li&gt;Extra-credit: Check server time settings to make sure you&amp;#8217;re not running big tasks at time periods when heavy traffic is expected&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Make sure your hosting provider has monitoring setup. It&amp;#8217;s good to gauge uptime % from launch
	&lt;ul&gt;
	&lt;li&gt;Extra-credit: Setup your own monitoring with &lt;a href="http://pingdom.com/"&gt;Pingdom&lt;/a&gt; or similar service to make sure you know when things are down. (You can audit your hosting provider this way!)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There are a handful of really great hosting companies out there for Ruby on Rails. Be sure to do your homework early! This isn&amp;#8217;t something you want to do at the last minute.&lt;/p&gt;


	&lt;p&gt;Reminder: &lt;strong&gt;Keep your project releasable at all times.&lt;/strong&gt;&lt;/p&gt;


	&lt;h2&gt;Search Engines and Analytics&lt;/h2&gt;


	&lt;p&gt;Before the big launch, be sure that you have outlined a consistent pattern for managing the &lt;span class="caps"&gt;HTML&lt;/span&gt; page titles on each page. Getting targeted traffic to your new web application is (usually) vital. Our team has adopted a basic pattern that we use throughout the application. This way we don&amp;#8217;t have to go through at the last minute and figure out where titles are and/or aren&amp;#8217;t being set.&lt;/p&gt;


	&lt;p&gt;In a previous post, I &lt;a href="http://www.robbyonrails.com/articles/2008/03/26/managing-seo-friendly-html-titles-with-rails"&gt;shared a basic plugin&lt;/a&gt; that our team uses on projects to manage page titles on a view-by-view basis.&lt;/p&gt;


	&lt;p&gt;Additionally, be sure to take advantage of using descriptive permalink URLs.&lt;/p&gt;


	&lt;p&gt;Another tip is to setup your application with analytics (&lt;a href="http://google.com/analytics"&gt;google analytics&lt;/a&gt; is free!) If there is one thing that I wish we had setup from day one on every project in the past, was a set of conversion goals. So, be sure to get into your analytics account and prepare your application so that you can track these goals from the moment your application is launched. Collecting as much data about your visitor&amp;#8217;s usage habits is going to help you in the coming weeks and months as you tune things based off of feedback and this data. Also, after you begin to introduce changes, you can analyze these metrics to verify that you&amp;#8217;re improving things and not the opposite.&lt;/p&gt;


	&lt;p&gt;So, be sure that you are doing the following:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Have implemented descriptive page titles and urls&lt;/li&gt;
		&lt;li&gt;Are ready to track your site visitor&amp;#8217;s usage habits from the starting gate
	&lt;ul&gt;
	&lt;li&gt;Conversion goals for obvious things like: sign-ups/registrations, viewing your product tour, contact requests, etc.&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;When Things Go Wrong / Tracking Exceptions&lt;/h2&gt;


	&lt;p&gt;What happens when things go wrong? We&amp;#8217;ve been amazed by how many projects we&amp;#8217;ve seen have been in production for months/years and lacking something that seemed so obvious. Exception notifications! All too often, we&amp;#8217;ve seen teams totally unaware that things were failing for their customers and not being reported to anybody. The easiest way to track exceptions in the past was to use the &lt;a href="http://github.com/rails/exception_notification/tree/master"&gt;exception_notification&lt;/a&gt; plugin that the Rails team manages. You can have this plugin send your development team emails with a backtrace and all the goodies that&amp;#8217;d normally show up in a 500 error. At a minimum, you should be using something like this.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Tip: Make sure your hosting environment can send out emails! (otherwise, you&amp;#8217;ll never know about these problems&amp;#8230;eek!)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;However, in the last year, the Rails community has seen two options, &lt;a href="http://getexceptional.com/"&gt;Exceptional&lt;/a&gt; and &lt;a href="http://www.hoptoadapp.com/"&gt;Hoptoad&lt;/a&gt; introduced for managing exceptions. Our team has only used Exceptional so far, because our good friends at &lt;a href="http://www.contrast.ie/"&gt;Contrast&lt;/a&gt; invited us to be early beta-testers for their new service. We love the Exceptional&amp;#8217;s integration with Lighthouse, which is the bug/issue tracking application that we&amp;#8217;re currently using. With Exceptional, our team is able to search through and track exceptions in our application and have a good meter on the overall health of our application. This solution works so much than the email-based approach because we can track which exceptions have been opened and sent to Lighthouse and if they&amp;#8217;ve been closed by someone already.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve heard great things about Hoptoad as well, but have yet to test it out. Would be interested to read a comparison between the two and am curious if there are other services for this currently.&lt;/p&gt;


	&lt;h2&gt;Non-default 404 and 500 pages&lt;/h2&gt;


	&lt;p&gt;Honestly, this is one of those things that we tend to forget about until the last minute. When you&amp;#8217;re launching a new project, you&amp;#8217;re bound to have a bug and/or a few broken links not accounted for. What you want to avoid is having your customers end up on an unhelpful page that looks like this:&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/6txe/the-page-you-were-looking-for-doesn-t-exist-404"&gt;&lt;img src="http://img.skitch.com/20081215-q11ckmua6qe5gf4nsd6ghptw83.preview.jpg" alt="The page you were looking for doesn't exist (404)" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;It doesn&amp;#8217;t take too long to put something together that is a bit more helpful for your visitors.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/6txm/alphaclone-page-not-found"&gt;&lt;img src="http://img.skitch.com/20081215-12prkpg4b98rptwiwy637ss1.preview.jpg" alt="AlphaClone — Page not found" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;So, do yourself a favor and add a ticket for your designers to design a custom 404 and 500 pages to replace the defaults that are provided by Ruby on Rails in &lt;code&gt;public/&lt;/code&gt;.&lt;/p&gt;


	&lt;h2&gt;Hold your client&amp;#8217;s hands&lt;/h2&gt;


	&lt;p&gt;If you&amp;#8217;re working with startups, do remember that this is quite possibly their first launch. It&amp;#8217;s important to remember that they&amp;#8217;re going to be going through their own spectrum of feelings and it&amp;#8217;s our job to help get them through the process with an eased mind. Show them that you have things covered, that things are ready to go, alert them when things pop up&amp;#8230; in a nutshell. Keep them informed about the challenges and do what you can help to manage their stress. If they&amp;#8217;ve just contracted you for an extended period of time to help get their &lt;strong&gt;big idea&lt;/strong&gt; designed and developed, remember that this launch is just the beginning of the race for them. They have a big journey ahead of them and you just helped them get their new car engine built. Make sure they know that things are likely to breakdown along the way, need to be refueled (refactor! refactor!), and need service repairs. The worst thing you can do is set the expectation that nothing will go wrong once their application is released into the wild. They need to budget for this early on so that they can pace themselves after launch. (this is a big topic definitely worth of it&amp;#8217;s own post)&lt;/p&gt;


	&lt;p&gt;Just remember that this should be a big celebration for your team and client. Remember to celebrate! (and then follow it with a retrospective)&lt;/p&gt;


	&lt;h2&gt;In Conclusion&lt;/h2&gt;


	&lt;p&gt;As mentioned, these are just a handful of things that we have learned to avoid overlooking (through trial and error). I&amp;#8217;m hoping to share more thoughts on launching in the near future and would love to hear from all of you on things that you&amp;#8217;ve come across. What works? What doesn&amp;#8217;t work?&lt;/p&gt;


	&lt;p&gt;What is on your checklist for launching successful projects?&lt;/p&gt;


	&lt;h3&gt;Related Articles&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2008/05/22/the-art-of-delivery-part-2"&gt;The Art of Delivery, part 2&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2006/04/21/agile-development-begins-within"&gt;Agile development begins within&amp;#8230;&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/06/17/audit-your-rails-development-team"&gt;Audit Your Rails Development Team&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/12/17/embracing-chaos-part-1"&gt;Embracing Chaos, part 1&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Sun, 14 Dec 2008 19:28:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:48f0cf4b-9683-408a-9c1d-92afa8a6ddae</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/12/14/launching-ruby-on-rails-projects-a-checklist</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>planetargon</category>
      <category>hosting</category>
      <category>development</category>
      <category>design</category>
      <category>projects</category>
      <category>clients</category>
      <category>deployment</category>
      <category>communication</category>
      <category>team</category>
      <category>boxcar</category>
      <category>capistrano</category>
      <category>launching</category>
      <category>seo</category>
      <category>tips</category>
    </item>
    <item>
      <title>AlphaClone on PostgreSQL and Ruby on Rails</title>
      <description>&lt;div class="thumbnail" style="float:right;"&gt;&lt;a href="http://alphaclone.com"&gt;&lt;img src="http://img.skitch.com/20081212-qcrp1ammxkuutyi16xtfa1w5ni.preview.jpg" alt="tour-ss-full-berkshire.jpg (JPEG Image, 370x713 pixels)" /&gt;&lt;/a&gt;&lt;/div&gt;
Earlier this week, our team launched a client&amp;#8217;s project into the public. We began working on it early this year and it was quite an endeavor for our team. The company that we helped launch is &lt;a href="http://alphaclone.com"&gt;AlphaClone&lt;/a&gt;, &lt;em&gt;a premier stock research and portfolio simulation service for individuals and professional investors alike. Clone, backtest and track over 230 top fund manager portfolios. More than 15,000 pre-generated clones and nearly limitless possibilities based on your own custom groups of funds.&lt;/em&gt; &lt;a href="http://alphaclone.com/tour"&gt;Take a tour of AlphaClone&amp;#8230;&lt;/a&gt;

	&lt;p&gt;&lt;a href="http://alphaclone.com"&gt;&lt;img src="http://alphaclone.com/images/logo-alphaclone.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s hard to deny that I&amp;#8217;m insanely proud of the team at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; for bringing our client&amp;#8217;s business idea to reality. We&amp;#8217;ve been enjoying keeping up on how the press is responding so far since they&amp;#8217;ve launched. I expect that they&amp;#8217;ll do well with their business endeavor and look forward to helping them evolve and expand.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve been asked to share some stories and lessons learned throughout the project. Given that we tackled a lot on the Interaction Design side of things in addition to relying a lot more on some of the advanced features of PostgreSQL (we&amp;#8217;re dealing with a &lt;span class="caps"&gt;TON&lt;/span&gt; of data here), we have things to share. So, stay tuned as I&amp;#8217;ll be highlighting some of those lessons over the coming week(s).&lt;/p&gt;


	&lt;p&gt;Additionally, if you&amp;#8217;re looking for a team to help you execute your next big idea, &lt;a href="http://planetargon.com/contact.html"&gt;give us a call&lt;/a&gt;!&lt;/p&gt;
</description>
      <pubDate>Fri, 12 Dec 2008 08:23:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:fe6c4690-e703-40f5-9f9d-1afafb3ceea7</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/12/12/alphaclone-on-postgresql-and-ruby-on-rails</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>clients</category>
      <category>development</category>
      <category>alphaclone</category>
      <category>projects</category>
      <category>team</category>
      <category>planetargon</category>
      <category>postgresql</category>
      <category>stocks</category>
      <category>data</category>
      <category>graphs</category>
    </item>
    <item>
      <title>Interviewed by Database Radio Podcast</title>
      <description>&lt;p&gt;Bob Zurek, the Chief Technology Officer at &lt;a href="http://www.enterprisedb.com/"&gt;EnterpriseDB&lt;/a&gt; interviewed me a few months ago for their new &lt;a href="http://www.enterprisedb.com/learning/database_radio.do"&gt;Database Radio podcast&lt;/a&gt;. It finally was published last week. Bob and I had a nice conversation about PostgreSQL and it&amp;#8217;s community, our use of PostgreSQL with Ruby, Ruby on Rails, and development tools/methods.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/68ej/database-radio-enterprisedb"&gt;&lt;img src="http://img.skitch.com/20081211-btkycyrke9ctrsqseqhhr1is1m.preview.jpg" alt="Database Radio | EnterpriseDB" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;You can listen to &lt;a href="http://www.enterprisedb.com/openDownloads.do?productId=416&amp;#38;redirectReason=true&amp;#38;productVersion=otherDownload"&gt;the podcast mp3&lt;/a&gt; and/or &lt;a href="http://www.enterprisedb.com/learning/dbr_russell.do"&gt;read the transcript&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Thu, 11 Dec 2008 11:46:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:f4455442-a72d-4b86-9521-ff22c2b4512c</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/12/11/interviewed-by-database-radio-podcast</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>interview</category>
      <category>podcast</category>
      <category>planetargon</category>
      <category>ruby</category>
      <category>postgresql</category>
      <category>enterprisedb</category>
    </item>
    <item>
      <title>The new RubyURL API</title>
      <description>&lt;p&gt;We&amp;#8217;ve just deployed the initial version of an &lt;a href="http://rubyurl.com/api"&gt;&lt;span class="caps"&gt;API&lt;/span&gt; for RubyURL&lt;/a&gt;. It makes it really easy to create RubyURLs and is now open to the public. Should it end up being abused, we&amp;#8217;ll consider introducing an &lt;span class="caps"&gt;API KEY&lt;/span&gt; for authenticating and tracking abuse.&lt;/p&gt;


	&lt;p&gt;In the meantime, you can now start to use the RubyURL &lt;span class="caps"&gt;API&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;For example, the following&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ curl  -i \ 
        -X POST \
        -H 'Content-Type: application/xml' \
        -d '&amp;lt;link&amp;gt;&amp;lt;website_url&amp;gt;http://github.com/robbyrussell&amp;lt;/website_url&amp;gt;&amp;lt;/link&amp;gt;' \
        http://rubyurl.com/api/links  
&lt;/code&lt;/pre&gt;

	&lt;p&gt;...would return the following response.&lt;/p&gt;


&lt;script src="http://gist.github.com/8207.js"&gt;&lt;/script&gt;

	&lt;p&gt;I&amp;#8217;ll be updating the &lt;a href="http://github.com/robbyrussell/shorturl/tree/master"&gt;ShortURL gem&lt;/a&gt; in the coming days (unless someone else wants to patch it first &lt;strong&gt;wink&lt;/strong&gt;) to take advantage of new &lt;span class="caps"&gt;API&lt;/span&gt;, versus how it&amp;#8217;s currently creating RubyURLs.&lt;/p&gt;


	&lt;p&gt;You can see the code &amp;amp; changes for this new &lt;span class="caps"&gt;API&lt;/span&gt; on the &lt;a href="http://github.com/robbyrussell/rubyurl/commits/master"&gt;RubyURL github site&lt;/a&gt;.&lt;/p&gt;


	&lt;h3&gt;Update with &lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/h3&gt;


	&lt;p&gt;I took a little time today to update the &lt;span class="caps"&gt;API&lt;/span&gt; and extend it to support &lt;span class="caps"&gt;JSON&lt;/span&gt;. So&amp;#8230; you can now use the RubyURL &lt;span class="caps"&gt;API&lt;/span&gt; to generate RubyURLs via &lt;span class="caps"&gt;JSON&lt;/span&gt;. (see &lt;a href="http://github.com/robbyrussell/rubyurl/commit/36bcd0716a0a86fdaaf352d7760653b886877f2e"&gt;commits&lt;/a&gt;)&lt;/p&gt;


&lt;script src="http://gist.github.com/8363.js"&gt;&lt;/script&gt;

	&lt;p&gt;Enjoy! If you&amp;#8217;re using RubyURL via the new &lt;span class="caps"&gt;API&lt;/span&gt;, I&amp;#8217;d love to hear about it. :-)&lt;/p&gt;
</description>
      <pubDate>Sun, 31 Aug 2008 13:55:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f47bfa0b-c16e-4e8c-ba67-1a220f158d08</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/08/31/the-new-rubyurl-api</link>
      <category>RubyURL</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>api</category>
      <category>REST</category>
      <category>xml</category>
      <category>rubyurl</category>
      <category>development</category>
    </item>
    <item>
      <title>Flash Message Conductor</title>
      <description>&lt;p&gt;Do you find yourself copying and pasting the same code from Rails application-to-application as new projects start? Our team has a handful of projects in development right now and we notice that some of these &lt;em&gt;reusable&lt;/em&gt; components tend to get out of sync when we bounce between projects. So, we&amp;#8217;re making an effort to spot these and are creating a handful of plugins so that we can keep them updated between projects. (I&amp;#8217;m sure that a lot of you do this as well)&lt;/p&gt;


	&lt;p&gt;In an effort to share some of our patterns, we&amp;#8217;ll try to release them into the wild for others to use and perhaps if you have better patterns to offer, we&amp;#8217;re always interested in improving our approach.&lt;/p&gt;


	&lt;h2&gt;Introducing Flash Message Conductor&lt;/h2&gt;


	&lt;p&gt;Over the years, our designers and developers have approached the management of flash messages several different ways. In Rails, the default way to add something to a flash message is to do something like this in your controller.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;flash&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:message&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;You have successfully signed in to your account.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;What we began doing a while back is to create a few controller helper methods:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;add_message&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;You have successfully signed in to your account.&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
&lt;span class="ident"&gt;add_notice&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;You've Got Mail!&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
&lt;span class="ident"&gt;add_error&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Oops! Something got fucked up!&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Really, nothing too crazy here, just a pattern that our developers have preferred to managing our application&amp;#8217;s flash messages.&lt;/p&gt;


	&lt;p&gt;Okay, so now for the part of the puzzle that we aimed to make consistent across our projects. Rendering flash messages would usually result in several lines of conditionals in our application layout to check if the flash had any values assigned to it. As we worked with our &lt;span class="caps"&gt;HTML&lt;/span&gt;/CSS designers to define a consistent pattern, we moved our code into a helper for rendering flash messages.&lt;/p&gt;


	&lt;p&gt;With Flash Message Conductor, we just need to pop in the following into our application layout.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; render_flash_messages %&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;If we had called &lt;code&gt;add_message&lt;/code&gt;, it&amp;#8217;d render the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_xml "&gt;&lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;div&lt;/span&gt; &lt;span class="attribute"&gt;id&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;flash_messages&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;p&lt;/span&gt; &lt;span class="attribute"&gt;class&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;message&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;You have successfully done XYZ...&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;p&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;div&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Or, should you have called &lt;code&gt;add_error&lt;/code&gt;, it&amp;#8217;d render the following:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_xml "&gt;&lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;div&lt;/span&gt; &lt;span class="attribute"&gt;id&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;flash_messages&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;
  &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt;&lt;span class="tag"&gt;p&lt;/span&gt; &lt;span class="attribute"&gt;class&lt;/span&gt;&lt;span class="punct"&gt;=&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;error&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&amp;gt;&lt;/span&gt;Oops! Something went bonkers!&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;p&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="punct"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="tag"&gt;div&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;What we&amp;#8217;ve done here is defined a consistent pattern for our designers and developers to follow. We&amp;#8217;ll always have a &lt;code&gt;div&lt;/code&gt; container that will use a &lt;code&gt;p&lt;/code&gt; tag to display the flash messages with a &lt;span class="caps"&gt;CSS&lt;/span&gt; class value that maps to the type of flash message that we&amp;#8217;re displaying. This makes it easier for us to reuse the same flash message styling (and tweak if necessary), but we know that it&amp;#8217;ll produce the same &lt;span class="caps"&gt;HTML&lt;/span&gt; across our applications.&lt;/p&gt;


	&lt;h3&gt;Installing Flash Message Conductor&lt;/h3&gt;


	&lt;p&gt;Like most &lt;em&gt;modern&lt;/em&gt; Rails applications, you can install with:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
script/plugin install git://github.com/planetargon/flash-message-conductor.git
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then all of our helper methods will be available to your application. We&amp;#8217;ve also included an example &lt;span class="caps"&gt;CSS&lt;/span&gt; file, which you&amp;#8217;ll find in the plugin directory.&lt;/p&gt;


	&lt;p&gt;Sample output:&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/wuef/flash-message-area"&gt;&lt;img src="http://img.skitch.com/20080830-n8k8ikkk3i8himuxhk7pbf8tg3.preview.jpg" alt="flash message area" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Grande, Trebuchet, sans-serif, Helvetica, Arial; font-size: 10px; color: #808080"&gt;Uploaded with &lt;a href="http://plasq.com/"&gt;plasq&lt;/a&gt;&amp;#8217;s &lt;a href="http://skitch.com"&gt;Skitch&lt;/a&gt;!&lt;/span&gt;&lt;/div&gt;

	&lt;p&gt;Anyhow, we&amp;#8217;ve posted the plugin up on GitHub for you all to use, if you&amp;#8217;d like to adopt a similar approach. If you have any alternative patterns that has helped your team, do share and I&amp;#8217;m looking forward to sharing some more of ours in the near future.&lt;/p&gt;


	&lt;p&gt;For more information, visit the &lt;a href="http://github.com/planetargon/flash-message-conductor"&gt;Flash Message Conductor plugin&lt;/a&gt; on GitHub.&lt;/p&gt;


	&lt;p&gt;If anything, hopefully this will inspire those of you who find yourself copying/pasting artifacts from application-to-application to extract that code into it&amp;#8217;s own reusable plugin. :-)&lt;/p&gt;
</description>
      <pubDate>Fri, 29 Aug 2008 16:35:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:95e800a7-f1a5-429b-94be-aed635f73036</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/08/29/flash-message-conductor</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>patterns</category>
      <category>pattern</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>development</category>
      <category>html</category>
      <category>css</category>
      <category>team</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>RSpec: It Should Behave Like</title>
      <description>&lt;p&gt;I was going through an older project of ours and cleaning up some specs and noticed how often we were doing the same thing in several places. When we started the project, we didn&amp;#8217;t get the benefits of shared groups. Now that we have some time to go through and update some of our older specs, I&amp;#8217;ve been trying to take advantage of the features currently available in &lt;a href="http://rspec.info/"&gt;RSpec&lt;/a&gt;. One feature that I haven&amp;#8217;t seen a lot of mention of by people is shared groups, so I thought I&amp;#8217;d take a few minutes to write up a quick intro to using it.&lt;/p&gt;


	&lt;p&gt;To pick some low-hanging fruit, let&amp;#8217;s take an all-too-familiar method, which you might be familiar with&amp;#8230; &lt;code&gt;login_required&lt;/code&gt;. Sound familiar? Have you found yourself &lt;em&gt;stubbing&lt;/em&gt; &lt;code&gt;login_required&lt;/code&gt; over and over throughout your specs?&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="constant"&gt;Admin&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;DohickiesController&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;

  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;stub!&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="constant"&gt;Dohicky&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:paginate&lt;/span&gt; &lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="constant"&gt;Array&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="symbol"&gt;:index&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

 &lt;span class="punct"&gt;...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;If you&amp;#8217;re requiring that a user should be logged in when interacting with most of the application (as in the case of an administration section/namespace), you might want to consolidate some of your work into one shared specification group. The basic premise behind this is that you can write a typical &lt;code&gt;describe&lt;/code&gt; block and load it into any other spec groups that you need. For example, in our case, we&amp;#8217;ll need to stub &lt;code&gt;login_required&lt;/code&gt; in several places. We can set this up in one shared group and reference it wherever necessary.&lt;/p&gt;


	&lt;p&gt;For example, here is what we&amp;#8217;ll start off with.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;an admin user is signed in&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;stub!&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="constant"&gt;Admin&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;DohickiesController&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="punct"&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;However, the new describe block isn&amp;#8217;t accessible from the block at the bottom of the example&amp;#8230; yet. To do this, we just need to pass the option: &lt;code&gt;:shared =&amp;gt; true&lt;/code&gt; as you&amp;#8217;ll see in the following example.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;an admin user is signed in&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;,&lt;/span&gt; &lt;span class="symbol"&gt;:shared&lt;/span&gt; &lt;span class="punct"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="constant"&gt;true&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;stub!&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Great, now we can reference it by referring to it with: &lt;code&gt;it_should_behave_like SharedGroupName&lt;/code&gt;. In our example above, this would look like:&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;an admin user is signed in&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="ident"&gt;controller&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;stub!&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:login_required&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="constant"&gt;Admin&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;DohickiesController&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;index&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;it_should_behave_like&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;an admin user is signed in&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="constant"&gt;Dohicky&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:paginate&lt;/span&gt; &lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="constant"&gt;Array&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;new&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="symbol"&gt;:index&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

 &lt;span class="punct"&gt;...&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;

&lt;span class="ident"&gt;describe&lt;/span&gt; &lt;span class="constant"&gt;Admin&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;DohickiesController&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;new&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="ident"&gt;it_should_behave_like&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;an admin user is signed in&lt;/span&gt;&lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;

  &lt;span class="ident"&gt;before&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:each&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
    &lt;span class="attribute"&gt;@dohicky&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="ident"&gt;mock_model&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="constant"&gt;Dohicky&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="constant"&gt;Dohicky&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;should_receive&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="symbol"&gt;:new&lt;/span&gt; &lt;span class="punct"&gt;).&lt;/span&gt;&lt;span class="ident"&gt;and_return&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt; &lt;span class="attribute"&gt;@dohicky&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;
    &lt;span class="ident"&gt;get&lt;/span&gt; &lt;span class="symbol"&gt;:new&lt;/span&gt;
  &lt;span class="keyword"&gt;end&lt;/span&gt;

  &lt;span class="punct"&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;That&amp;#8217;s it! Pretty simple, eh? We can now reference this shared group in any describe blocks that we want to. A benefit to this approach is that we can make change the authentication system (say, we decide to switch it entirely and/or even just change method names, set any other prerequisites necessary when an admin is signed in), we&amp;#8217;ll have a single place to change in our specs. (&lt;strong&gt;tip:&lt;/strong&gt; you can put these in your &lt;code&gt;spec_helper&lt;/code&gt; file)&lt;/p&gt;


	&lt;p&gt;You can learn more about &lt;code&gt;it_should_behave_like&lt;/code&gt; and other helpful features on the &lt;a href="http://rspec.info/documentation/"&gt;RSpec documentation site&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;If you have any suggestions on better ways of handling things like this, please follow up and share your solutions. I&amp;#8217;m always looking to sharpen my tools. :-)&lt;/p&gt;


	&lt;h3&gt;Update&lt;/h3&gt;


	&lt;p&gt;In response, &lt;a href="http://brynary.com/"&gt;Bryan Helmkamp&lt;/a&gt; suggests that a better solution is to define a method in our specs like, for example: &lt;code&gt;build_mock_user_and_login&lt;/code&gt;. then calling it in our &lt;code&gt;before(:each)&lt;/code&gt;. So, maybe the approach above isn&amp;#8217;t the most ideal method but I did wantt o draw some attention to &lt;code&gt;it_should_behave_like&lt;/code&gt;. I suppose that I need a better example.. another post, perhaps? :-)&lt;/p&gt;


	&lt;p&gt;Also, Ed Spencer has posted an article titled, &lt;a href="http://edspencer.net/2008/08/drying-up-your-crud-controller-rspecs.html"&gt;DRYing up your &lt;span class="caps"&gt;CRUD&lt;/span&gt; controller RSpecs&lt;/a&gt;, which will introduce you mor to &lt;code&gt;it_should_behave_like&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Thanks for feedback people!&lt;/p&gt;


	&lt;h3&gt;Related Posts&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/02/13/be-careful-that-you-dont-stub-your-big-toe"&gt;Be Careful that you don&amp;#8217;t Stub your Big Toe&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.robbyonrails.com/articles/2007/08/02/spec-your-views"&gt;Spec Your Views&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Tue, 19 Aug 2008 21:47:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:769c7a25-afa3-40aa-aeb4-98c2ac61115a</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/08/19/rspec-it-should-behave-like</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>development</category>
      <category>rspec</category>
      <category>controllers</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>agile</category>
      <category>tutorial</category>
      <category>specs</category>
      <category>code</category>
    </item>
    <item>
      <title>Expanding Rails Boxcar packages</title>
      <description>&lt;p&gt;If you&amp;#8217;re in the market for a new hosting provider for your Ruby on Rails application, you might take a look at the new options for &lt;a href="http://railsboxcar.com/"&gt;Rails Boxcar.&lt;/a&gt; We recently expanded our service offerings into three pricing tiers as well as custom packages for those who need a bit more.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.railsboxcar.com/img/boxcar_logo_wide.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;A few things that we&amp;#8217;ve recently added support for:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Provide us your &lt;span class="caps"&gt;SSH&lt;/span&gt; key during sign up!
	&lt;ul&gt;
	&lt;li&gt;Allows us to keep your server even more secure by avoiding sending passwords over the net&lt;/li&gt;
		&lt;li&gt;Other fun features related to this coming soon&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
		&lt;li&gt;Auto-configured Nginx w/Mongrel cluster&lt;/li&gt;
		&lt;li&gt;Phusion Passenger (&lt;strong&gt;mod_rails&lt;/strong&gt;) support! (for those with mixed-environments)&lt;/li&gt;
		&lt;li&gt;Continued development of &lt;a href="http://github.com/planetargon/boxcar-conductor/tree/master"&gt;Boxcar Conductor&lt;/a&gt;)&lt;/li&gt;
		&lt;li&gt;...more in the works!&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The best part is that we can get you up and running with a new Boxcar now for as low as $59/month &lt;span class="caps"&gt;USD&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;For more information, visit: &lt;a href="http://railsboxcar.com"&gt;http://railsboxcar.com&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;If you have any questions, don&amp;#8217;t hesitate to &lt;a href="mailto:contact@planetargon.com?subject=Boxcar"&gt;contact us&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Mon, 04 Aug 2008 09:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:f8d2d740-aad7-4c44-9465-53b9767e4df7</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/08/04/expanding-rails-boxcar-packages</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>boxcar</category>
      <category>hosting</category>
      <category>rails</category>
      <category>plugin</category>
      <category>vps</category>
      <category>capistrano</category>
    </item>
    <item>
      <title>Ruby 1.8.7 on MacPorts causing some problems</title>
      <description>&lt;p&gt;It appears that MacPorts has upgraded to Ruby 1.8.7, which is good news if you&amp;#8217;re running Rails 2.1&amp;#8230; but if you have an older Rails application&amp;#8230; it&amp;#8217;s not going to work too well.&lt;/p&gt;


	&lt;p&gt;In order to get Ruby 1.8.6 installed with the latest MacPorts, you&amp;#8217;ll need to do the following.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  $ mkdir /Users/Shared/dports
&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;
$ svn checkout -r 36429 \ 
    http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ \ 
    /Users/Shared/dports/lang/ruby/
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then you&amp;#8217;ll need to modify your macports to use this new local source. You&amp;#8217;ll need to edit &lt;code&gt;/opt/local/etc/macports/sources.conf&lt;/code&gt;  and add the following line above the existing rsync record.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;file:///Users/Shared/dports and create that directory&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Next, you&amp;#8217;ll want to index this new local source with the following command:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;portindex /Users/Shared/dports&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;After that, you can do the following.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port uninstall rb-rubygems ruby&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port clean rb-rubygems ruby&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo rm -r /opt/local/lib/ruby/gems/1.8/doc/rubygems-1.1.1/&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port deactivate autoconf&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;sudo port install ruby rb-rubygems&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;..and hopefully you&amp;#8217;ll have Ruby 1.8.6 installed and be able to retain the rubygems you installed already.&lt;/p&gt;
</description>
      <pubDate>Fri, 20 Jun 2008 16:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d949213f-ee18-44ed-a39f-a644f33289ca</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/06/20/ruby-1-8-7-on-macports-causing-some-problems</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>macports</category>
      <category>ruby</category>
      <category>rubygems</category>
    </item>
    <item>
      <title>New Boxcar plans announced!</title>
      <description>&lt;p&gt;Yesterday we announced our new suite of plans for Rails Boxcar. You can now get started with a pre-configured &lt;span class="caps"&gt;VPS&lt;/span&gt; designed by Rails developers like you for as low as $59/month.&lt;/p&gt;


	&lt;p&gt;You can check out our new rates here:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://railsboxcar.com"&gt;http://railsboxcar.com&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;If you&amp;#8217;re at RailsConf, be sure to introduce yourself and ask for details. :-)&lt;/p&gt;
</description>
      <pubDate>Fri, 30 May 2008 14:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:09b31bcf-a1b8-4699-b262-13cbc23ae63f</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/05/30/new-boxcar-plans-announced</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>hosting</category>
      <category>rails</category>
      <category>vps</category>
      <category>boxcar</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>Meet us at RailsConf</title>
      <description>&lt;p&gt;If you&amp;#8217;re coming to Portland for RailsConf or CabooseConf, be sure to introduce yourself (and we&amp;#8217;ll try to do the same). A few of us from &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; will be attending the conference. I thought that I&amp;#8217;d make it easy to spot us by putting some faces to our names.&lt;/p&gt;


	&lt;p&gt;In corner #1 we have &lt;strong&gt;Alex Malinovich&lt;/strong&gt; who is our Director of Deployment Services. If you have any questions about hosting options, deployment tips, and scaling your Ruby on Rails application.. be sure to tug on his shoulder. I also overheard that he&amp;#8217;ll be giving people discounts on our Boxcar products to those he meets in person.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/2419611753/" title="Alex by Robby Russell, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2236/2419611753_d829f271d1.jpg" width="500" height="333" alt="Alex" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;&lt;strong&gt;Alex Malinovich&lt;/strong&gt;, Director of Deployment Services&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;In corner #2, we have &lt;strong&gt;Andy Delcambre&lt;/strong&gt; who is on our development team. You might remember Andy from his series of &lt;a href="http://andy.delcambre.com/tags/git"&gt;blog posts/tutorials on using Git&lt;/a&gt; and getting &lt;a href="http://andy.delcambre.com/2007/8/17/authenticated-rss-proxy"&gt;Basecamp &lt;span class="caps"&gt;RSS&lt;/span&gt; feeds working in Google Reader&lt;/a&gt; via a Mongrel-based proxy (our team is still using this approach using this after ten months!).&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/2432834995/" title="Andy by Robby Russell, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2096/2432834995_eb937af274.jpg" width="333" height="500" alt="Andy" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;&lt;strong&gt;Andy Delcambre&lt;/strong&gt;, Software Developer&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;In corner #3, we have &lt;strong&gt;Gary Blessington&lt;/strong&gt; who has been leading our design and development team. If you&amp;#8217;re looking for a job working with Ruby on Rails, be sure to introduce yourself to Gary as he&amp;#8217;s hoping to meet up with several applicants who will be in Portland this week.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/1430587811/" title="IMG_9286 copy.jpg by Robby Russell, on Flickr"&gt;&lt;img src="http://farm2.static.flickr.com/1167/1430587811_36d525cbf8.jpg" width="500" height="333" alt="IMG_9286 copy.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;&lt;strong&gt;Gary Blessington&lt;/strong&gt;, Director of Design and Development&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;In corner #4&amp;#8230; is me. I&amp;#8217;m not doing any talks this year so I plan to do wander around stress-free as I&amp;#8217;m not finishing my slides at the last minute or preparing for panel talks. I&amp;#8217;m happy to field questions and exchange stories with you. :-)&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/518770652/" title="me... by Robby Russell, on Flickr"&gt;&lt;img src="http://farm1.static.flickr.com/250/518770652_61c87e940f.jpg" width="500" height="333" alt="me..." /&gt;&lt;/a&gt;&lt;br /&gt;&lt;small&gt;&lt;strong&gt;Robby Russell&lt;/strong&gt;&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://jobs.rubynow.com/jobs/show/2238"&gt;We are hiring&lt;/a&gt;... so feel free to introduce yourself to any of the faces above.&lt;/p&gt;


	&lt;p&gt;...and most importantly, I hope you have a great time in Portland!&lt;/p&gt;
</description>
      <pubDate>Wed, 28 May 2008 08:46:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b8ddcb74-ffad-4495-974a-d0eeaeffd9d6</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/05/28/meet-us-at-railsconf</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>jobs</category>
      <category>rubyonrails</category>
      <category>planetargon</category>
      <category>portland</category>
      <category>railsconf</category>
    </item>
    <item>
      <title>Boxcar Conductor plugin moved</title>
      <description>&lt;p&gt;Update. We&amp;#8217;ve moved the &lt;a href="http://www.robbyonrails.com/articles/2008/04/15/boxcar-conductor-rails-deployment-made-easy"&gt;Boxcar Conductor plugin&lt;/a&gt; for deploying Ruby on Rails applications to a new location on &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/planetargon/boxcar-conductor"&gt;http://github.com/planetargon/boxcar-conductor&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;You can still submit bugs/feature requests on Lighthouse here:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://planetargon.lighthouseapp.com/projects/9962-boxcar-conductor/overview"&gt;Boxcar on Lighthouse&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
      <pubDate>Fri, 23 May 2008 04:23:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:59197be4-0139-4950-9281-4d3fee8b4af3</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/05/23/boxcar-conductor-plugin-moved</link>
      <category>Ruby on Rails</category>
      <category>PLANET ARGON</category>
      <category>boxcar</category>
      <category>hosting</category>
      <category>rails</category>
      <category>plugin</category>
      <category>vps</category>
      <category>capistrano</category>
    </item>
  </channel>
</rss>

