<?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: Tag ruby</title>
    <link>http://www.robbyonrails.com/articles/tag/ruby</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>thoughts.sort_by{|t| t[:topic]}.collect </description>
    <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>RubyURL meets Zombies!</title>
      <description>&lt;p&gt;Last Friday, Greg Borenstein sent me a link to &lt;a href="http://zombieurl.com"&gt;ZombieURL&lt;/a&gt; after it got launched. The folks at &lt;a href="http://bottlecaplabs.net/"&gt;Bottlecap Labs&lt;/a&gt; took &lt;a href="http://rubyurl.com"&gt;RubyURL&lt;/a&gt; and threw in Zombies&amp;#8230; the rest you&amp;#8217;ll have to see for yourself.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://zombieurl.com/Ssfl"&gt;don&amp;#8217;t click this link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There&amp;#8230; I warned you.&lt;/p&gt;


	&lt;p&gt;You can check out the source code for ZombieURL on GitHub&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/bottlecaplabs/zombieurl/tree"&gt;http://github.com/bottlecaplabs/zombieurl/tree&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;You can also grab the underlying source code for RubyURL on GitHub.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://github.com/robbyrussell/rubyurl/tree/master"&gt;http://github.com/robbyrussell/rubyurl/tree/master&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I&amp;#8217;d love to see what other fun things people come up with to do with RubyURL.&lt;/p&gt;
</description>
      <pubDate>Tue, 22 Apr 2008 11:43:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:70c2e909-d2f1-4ecc-8c28-7edcfef5784e</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/04/22/rubyurl-meets-zombies</link>
      <category>RubyURL</category>
      <category>ruby</category>
      <category>development</category>
      <category>zombies</category>
      <category>rubyurl</category>
      <category>github</category>
    </item>
    <item>
      <title>Managing Required Gems on Rails Projects</title>
      <description>&lt;p&gt;We&amp;#8217;re starting a new project and I&amp;#8217;m finding myself adding things to the code base that we&amp;#8217;ve done in the past&amp;#8230; hence the last few posts. As we&amp;#8217;re doing this, I&amp;#8217;d like to highlight some of the little things that we do on each project to maintain some consistency and in that process reach out to the community for alternative approaches.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m intrigued by the &lt;a href="http://errtheblog.com/posts/50-vendor-everything"&gt;vendor everything&lt;/a&gt; concept, but we haven&amp;#8217;t yet adopted this on any of our projects (yet).&lt;/p&gt;


	&lt;p&gt;What we have been doing is to maintain a &lt;code&gt;REQUIRED_GEMS&lt;/code&gt; file in the root directory of our Rails application.&lt;/p&gt;


	&lt;p&gt;For example:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ cat REQUIRED_GEMS

actionmailer
actionpack
actionwebservice
activerecord
activesupport
cgi_multipart_eof_fix
daemons
fastercsv
fastthread
feedtools
gem_plugin
image_science
mongrel
mongrel_cluster
mysql
rails
rake
RedCloth
Ruby-MemCache
soap4r
uuidtools
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Everybody on the team (designers/developers) knows to look here to make sure they have everything installed when beginning to work on the application.&lt;/p&gt;


	&lt;p&gt;This has worked fairly well from project to project but since we&amp;#8217;re starting a new project, I&amp;#8217;m curious if anybody has some better ways to approach this. Should we look more seriously at the vendor everything approach or are there any alternative approaches?&lt;/p&gt;
</description>
      <pubDate>Wed, 26 Mar 2008 22:27:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1dad9e29-fb50-447c-802d-1a0f6109ff1d</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/03/26/managing-required-gems-on-rails-projects</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>gems</category>
      <category>rubyonrails</category>
      <category>ruby</category>
      <category>rails</category>
      <category>workflow</category>
      <category>team</category>
      <category>planetargon</category>
      <category>question</category>
      <category>tip</category>
    </item>
    <item>
      <title>Things (in the Rails world) You Don't Yet Understand</title>
      <description>&lt;p&gt;This is inspired by a recent post by Seth Godin titled, &lt;a href="http://sethgodin.typepad.com/seths_blog/2008/03/things-you-dont.html"&gt;Things you don&amp;#8217;t understand&lt;/a&gt;, where he shared a list of things that he probably could understand if he put your mind to it, but doesn&amp;#8217;t. I decided to post a list of five (5) things in response within the context of Ruby/Rails.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m really interested in various things but am really unable to prioritize them high enough to spend the time to understand them.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;RSpec User Stories&lt;/li&gt;
		&lt;li&gt;Using Selenium with RSpec&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://jquery.com/"&gt;JQuery&lt;/a&gt; (&lt;a href="http://blog.imperialdune.com/"&gt;Graeme&lt;/a&gt; speaks highly of it)&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://code.google.com/p/jsspec/"&gt;JSSpec&lt;/a&gt; (BDD for Javascript)&lt;/li&gt;
		&lt;li&gt;Using the Google Charts &lt;span class="caps"&gt;API&lt;/span&gt; with Rails&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;What about you? What&amp;#8217;s your list of things that you&amp;#8217;d like to understand more about?&lt;/p&gt;
</description>
      <pubDate>Tue, 25 Mar 2008 10:12:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2ad10b2f-7185-4d43-bc2e-1e881281f1c5</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/03/25/things-in-the-rails-world-you-dont-yet-understand</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>question</category>
      <category>rspec</category>
      <category>jquery</category>
      <category>javascript</category>
      <category>ruby</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>google</category>
      <category>charts</category>
      <category>godin</category>
    </item>
    <item>
      <title>Deploying Rails with an interactive Capistrano recipe to your Boxcar</title>
      <description>&lt;p&gt;I wanted to share something that I&amp;#8217;ve been meaning to share on here.&lt;/p&gt;


	&lt;p&gt;When we began planning &lt;a href="http://railsboxcar.com"&gt;Rails Boxcar&lt;/a&gt;, we really want to reduce the amount of work that it took to setup and deploy a &lt;span class="caps"&gt;VPS&lt;/span&gt; for a Rails application. During this period, we began to look at the deployment process itself and began working on an interactive tool for developers for setting up their deployment environment on their Boxcar instances. So, we worked with few customers to develop an interactive Capistrano recipe.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;The Goal?&lt;/strong&gt; Spend less time configuring the server or editing recipe files.&lt;/p&gt;


	&lt;p&gt;During the initial setup, we can have the customer provide a few details from the safety of their Rails application directory by answering the following.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;What database server will you be using? (PostgreSQL or MySQL)&lt;/li&gt;
		&lt;li&gt;What port does your database run on? (if different than the default for your db server)&lt;/li&gt;
		&lt;li&gt;What is your database username?&lt;/li&gt;
		&lt;li&gt;What is your database user&amp;#8217;s password?&lt;/li&gt;
		&lt;li&gt;What port will your mongrel cluster start with? &lt;/li&gt;
		&lt;li&gt;How many mongrel servers should your cluster run?&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Great&amp;#8230; setup the server and let&amp;#8217;s deploy!&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/bsx8/default"&gt;&lt;img src="http://img.skitch.com/20080228-x5rksmf1b7dkx1x57spsr9rwr9.preview.jpg" alt="Default" /&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;br /&gt;&lt;small&gt;Feel free to snag our &lt;a href="http://pastie.caboo.se/99450"&gt;interactive Capistrano2 recipe&lt;/a&gt;. &lt;/small&gt;

	&lt;p&gt;We&amp;#8217;re trying to take the pain out of deploying your Ruby on Rails applications with &lt;a href="http://railsboxcar.com/"&gt;Boxcar&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;On a side note, we&amp;#8217;re in the process of expanding our team and &lt;a href="http://blog.planetargon.com/2008/2/20/welcome-alex"&gt;recently hired Alex Malinovich&lt;/a&gt;. Do stay tuned as we&amp;#8217;ll be posting important announcements about changes to our &lt;a href="http://planetargon.com/hosting.html"&gt;Rails hosting services&lt;/a&gt; in the next few weeks. (&lt;strong&gt;grin&lt;/strong&gt;)&lt;/p&gt;
</description>
      <pubDate>Thu, 28 Feb 2008 16:27:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:48a471b7-2cbe-445e-b82f-f0933288d293</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/02/28/deploying-rails-with-an-interactive-capistrano-recipe-to-your-boxcar</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PLANET ARGON</category>
      <category>boxcar</category>
      <category>deployment</category>
      <category>rails</category>
      <category>ruby</category>
      <category>capistrano</category>
      <category>hosting</category>
    </item>
    <item>
      <title>Installing Ruby on Rails and PostgreSQL on OS X, Third Edition</title>
      <description>&lt;p&gt;Over the past few years, I&amp;#8217;ve helped you walk through the process of getting Ruby on Rails up and running on Mac &lt;span class="caps"&gt;OS X&lt;/span&gt;. The last version has been getting a lot of comments related to issues with the new Apple Leopard, so I&amp;#8217;m going this post will expand on previous installation guides with what&amp;#8217;s working for me as of January 2008.&lt;/p&gt;


	&lt;p&gt;The following guide is how our development team at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; prefers to setup our development workstations&lt;/p&gt;


	&lt;p&gt;During this installation, we&amp;#8217;ll have what we feel is the optimal development stack for building &lt;a href="http://rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; applications with our favorite database server, &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Ready? Let&amp;#8217;s get started&amp;#8230;&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 underlying dependencies that we&amp;#8217;ll be building off of.&lt;/p&gt;


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


	&lt;p&gt;The first thing that you&amp;#8217;ll need to install to get far with this process is XCode tools, which is distributed by Apple. You can find this on the &lt;span class="caps"&gt;DVD&lt;/span&gt; that your Leopard installer is on. You can also download the latest version from Apple&amp;#8217;s developer site.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://developer.apple.com/tools/download/"&gt;http://developer.apple.com/tools/download/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The current version (3.0) is 1.1 GB.. so the download time will vary depending on your connection speed. I would encourage you to drink some tea and/or &lt;a href="http://www.amazon.com/gp/product/0684868768?ie=UTF8&amp;#38;tag=robonrai-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=0684868768"&gt;read a book&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=robonrai-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=0684868768" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;&lt;/p&gt;


	&lt;p&gt;Once you finish the installation, you can move forward. The rest of these installation &lt;strong&gt;will not work&lt;/strong&gt; until XCode is installed. :-)&lt;/p&gt;


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


	&lt;p&gt;In this next step, we&amp;#8217;ll install &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; (formerly known as DarwinPorts). The MacPorts web site describes itself as, &lt;em&gt;&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;/em&gt;&lt;/p&gt;


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


	&lt;p&gt;This tool is about to become one of the most important tools on your operating system as 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’re from the Linux or &lt;span class="caps"&gt;BSD&lt;/span&gt; world, you are likely familiar with similar tools… such as: apt-get, port, and yum.&lt;/p&gt;


	&lt;p&gt;First, you&amp;#8217;ll want to download MacPorts and install the &amp;#8220;dmg&amp;#8221; disk file for Leopard at the following link.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.macports.org/install.php"&gt;http://www.macports.org/install.php&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Once downloaded, you&amp;#8217;ll want to run the installer and install it on your workstation.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdqg/install-macports-1.6.0"&gt;&lt;img src="http://img.skitch.com/20080122-efm4gb9pbb79p4ujya1ceisn37.preview.jpg" alt="Install MacPorts-1.6.0" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Work you way through the installer until successfully installed.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdqe/install-macports-1.6.0"&gt;&lt;img src="http://img.skitch.com/20080122-rr9e1begkg73ixt11d697wpdfh.preview.jpg" alt="Install MacPorts-1.6.0" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Once this finishes, you can open up your favorite terminal application and run the following to test that it installed properly.&lt;/p&gt;


	&lt;p&gt;In my case, I&amp;#8217;m now using Terminal.app.&lt;/p&gt;


	&lt;p&gt;Issue the command: &lt;code&gt;/opt/local/bin/port version&lt;/code&gt;&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdqm/opt-local-bin-port-version"&gt;&lt;img src="http://img.skitch.com/20080122-piqes1e66rgj1bui7eud9sisf7.preview.jpg" alt="_opt_local_bin_port version" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;If it responds with a version number like mine did in the screenshot above, we&amp;#8217;re moving along nicely.&lt;/p&gt;


	&lt;h3&gt;Environment Paths&lt;/h3&gt;


	&lt;p&gt;When we install MacPorts, the command to install/update ports installed to &lt;code&gt;/opt/local/bin&lt;/code&gt;. We had to provide the entire path as this isn&amp;#8217;t currently showing up in the default &lt;code&gt;$PATH&lt;/code&gt; on Leopard. Let&amp;#8217;s quickly remedy this by modifying the file &lt;code&gt;/etc/profile&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;If you have Textmate installed, you can run the following from your terminal: &lt;code&gt;mate /etc/profile&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Add the following line to the bottom of &lt;code&gt;/etc/profile&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;export PATH=/opt/local/bin:/opt/local/sbin:$PATH&lt;/code&gt;&lt;/pre&gt;

&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdxb/profile"&gt;&lt;img src="http://img.skitch.com/20080122-mqk8awqpbeebmdq7p7r1gyixsy.preview.jpg" alt="profile" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;You can use your favorite editor to update this file. Once you save it, you&amp;#8217;ll want to restart your terminal application (or open a new tab) to create a new session. When your new terminal opens, run the following to verify that &lt;code&gt;port&lt;/code&gt; is showing up in your &lt;code&gt;$PATH&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;which port&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;You should see &lt;code&gt;/opt/local/bin/port&lt;/code&gt; show up as the result of this command.&lt;/p&gt;


&lt;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdx8/which-port"&gt;&lt;img src="http://img.skitch.com/20080122-d4hte4cm5gn67a4cum26gbibut.preview.jpg" alt="which port" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;Great, let&amp;#8217;s continue to move forward.&lt;/p&gt;


	&lt;h3&gt;Hiding Apple&amp;#8217;s Ruby, Gems, and Rails&lt;/h3&gt;


	&lt;p&gt;Before we install Ruby from MacPorts, we&amp;#8217;ll go ahead and hide Apple&amp;#8217;s Ruby installations.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
    :~ robbyrussell$ 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;div class="thumbnail"&gt;&lt;a href="http://skitch.com/robbyrussell/fdxe/hiding-apples-ruby"&gt;&lt;img src="http://img.skitch.com/20080122-rgmsuy746h73b1bc93j4nyi5ar.preview.jpg" alt="hiding apples ruby" /&gt;&lt;/a&gt;&lt;/div&gt;

	&lt;p&gt;If you ever decide to remove MacPorts, you can just rename &lt;code&gt;ruby.orig&lt;/code&gt; back to &lt;code&gt;ruby&lt;/code&gt; and you&amp;#8217;re back where you started&amp;#8230; and the same for the others listed.&lt;/p&gt;


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


	&lt;p&gt;During this next phase, we&amp;#8217;re going to install Ruby and Ruby on Rails.&lt;/p&gt;


	&lt;h3&gt;Installing Ruby via MacPorts&lt;/h3&gt;


	&lt;p&gt;Now that we have MacPorts up and running, we&amp;#8217;re going to use it for the first time. We&amp;#8217;ll start by using it to install Ruby and the Rubygems package.&lt;/p&gt;


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

	&lt;p&gt;Okay, this will take a little while. I&amp;#8217;d suggest that you step out to get some fresh air.&lt;/p&gt;


	&lt;p&gt;How was it outside? What&amp;#8217;s the weather like there today? It&amp;#8217;s currently 2:30am &lt;span class="caps"&gt;PST&lt;/span&gt; so it&amp;#8217;s dark and an 28F outside so I didn&amp;#8217;t stay outside very long.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re still waiting for it to install, perhaps you could watch the following video. I might encourage you to check out more of &lt;a href="http://en.wikipedia.org/wiki/Jam_%28TV_series%29"&gt;Jam&lt;/a&gt;, which was recommended a few years ago to me by &lt;a href="http://interblah.net/"&gt;James Adam&lt;/a&gt; at &lt;a href="http://www.canadaonrails.org/"&gt;Canada on Rails&lt;/a&gt;.&lt;/p&gt;


&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/sLD0SNCFtyA&amp;#38;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/sLD0SNCFtyA&amp;#38;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;Be warned&amp;#8230; it&amp;#8217;s a strange show, but I find strange things like this funny. :-)&lt;/p&gt;


	&lt;p&gt;If you prefer something a bit more lighthearted&amp;#8230;&lt;/p&gt;


&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/SO5WoLnOOlU&amp;#38;rel=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/SO5WoLnOOlU&amp;#38;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;

	&lt;p&gt;Okay&amp;#8230; when Ruby finishes installing, you&amp;#8217;ll want to test that you can run it.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ ruby -v&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, let&amp;#8217;s move forward!&lt;/p&gt;


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


	&lt;p&gt;We&amp;#8217;re now going to install the libraries that make up Ruby on Rails via RubyGems.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo gem install --include-dependencies rails&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This will install the following gems.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;rails-2.0.2&lt;/li&gt;
		&lt;li&gt;rake-0.8.1&lt;/li&gt;
		&lt;li&gt;activesupport-2.0.2&lt;/li&gt;
		&lt;li&gt;activerecord-2.0.2&lt;/li&gt;
		&lt;li&gt;actionpack-2.0.2&lt;/li&gt;
		&lt;li&gt;actionmailer-2.0.2&lt;/li&gt;
		&lt;li&gt;activeresource-2.0.2&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Excellent, let&amp;#8217;s move forward&amp;#8230;&lt;/p&gt;


	&lt;p&gt;If you haven&amp;#8217;t already purchased it, I recommend that you take a look at &lt;a href="http://www.amazon.com/gp/product/0321445619?ie=UTF8&amp;#38;tag=robonrai-20&amp;#38;linkCode=as2&amp;#38;camp=1789&amp;#38;creative=9325&amp;#38;creativeASIN=0321445619"&gt;The Rails Way (Addison-Wesley Professional Ruby Series)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=robonrai-20&amp;#38;l=as2&amp;#38;o=1&amp;#38;a=0321445619" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; by Obie Fernandez.&lt;/p&gt;


	&lt;h3&gt;Installing Mongrel via RubyGems&lt;/h3&gt;


	&lt;p&gt;Let&amp;#8217;s now install Mongrel, which is an excellent Ruby-based web server for Ruby on Rails applications. We use it in development and production at &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt; and it&amp;#8217;s also what we recommend to our &lt;a href="http://planetargon.com/hosting.html"&gt;hosting customers&lt;/a&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo gem install --include-dependencies mongrel mongrel_cluster&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;Note:&lt;/strong&gt; Be sure to select the proper platform for mongrel. (hint: &lt;span class="caps"&gt;OS X&lt;/span&gt; is &lt;span class="caps"&gt;NOT&lt;/span&gt; mswin32)&lt;/li&gt;
	&lt;/ul&gt;


My terminal output:
&lt;pre&gt;&lt;code&gt;
Select which gem to install for your platform (i686-darwin9.1.0)
 1. mongrel 1.1.3 (java)
 2. mongrel 1.1.3 (i386-mswin32)
 3. mongrel 1.1.3 (ruby)
 4. mongrel 1.1.2 (ruby)
 5. mongrel 1.1.2 (mswin32)
 6. mongrel 1.1.2 (java)
 7. Skip this gem
 8. Cancel installation
&amp;gt; 3
Select which gem to install for your platform (i686-darwin9.1.0)
 1. fastthread 1.0.1 (mswin32)
 2. fastthread 1.0.1 (ruby)
 3. Skip this gem
 4. Cancel installation
&amp;gt; 2
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed mongrel-1.1.3
Successfully installed gem_plugin-0.2.3
Successfully installed daemons-1.0.9
Successfully installed fastthread-1.0.1
Successfully installed cgi_multipart_eof_fix-2.5.0
Installing ri documentation for mongrel-1.1.3...
Installing ri documentation for gem_plugin-0.2.3...
Installing ri documentation for daemons-1.0.9...
Installing ri documentation for fastthread-1.0.1...

No definition for dummy_dump

No definition for dummy_dump

No definition for rb_queue_marshal_load

No definition for rb_queue_marshal_dump
Installing ri documentation for cgi_multipart_eof_fix-2.5.0...
Installing RDoc documentation for mongrel-1.1.3...
Installing RDoc documentation for gem_plugin-0.2.3...
Installing RDoc documentation for daemons-1.0.9...
Installing RDoc documentation for fastthread-1.0.1...

No definition for dummy_dump

No definition for dummy_dump

No definition for rb_queue_marshal_load

No definition for rb_queue_marshal_dump
Installing RDoc documentation for cgi_multipart_eof_fix-2.5.0...
Successfully installed mongrel_cluster-1.0.5
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, you have almost all of the essentials.. except a database.&lt;/p&gt;


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


	&lt;p&gt;In this phase, we&amp;#8217;re going to get our database server, PostgreSQL, installed and the libraries that Ruby needs to communicate with it.&lt;/p&gt;


	&lt;h3&gt;Installing PosgreSQL with MacPorts&lt;/h3&gt;


	&lt;p&gt;At &lt;a href="http://planetargon.com"&gt;Planet Argon&lt;/a&gt;, we design and develop our applications on top of &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt;. I’ve been advocating the adoption of this awesome open source database in the Rails community for quite some time now.&lt;/p&gt;


	&lt;p&gt;The current version available of PostgreSQL via MacPorts is 8.3, which is what we&amp;#8217;ll now install with the &lt;code&gt;port&lt;/code&gt; command.&lt;/p&gt;


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


	&lt;p&gt;This will download and install the necessary libraries to run PostgreSQL server and the client utilities.&lt;/p&gt;


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


	&lt;p&gt;When PostgreSQL is finished installing, it&amp;#8217;ll tell you to run the following commands to create a new database instance.&lt;/p&gt;


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

	&lt;h4&gt;Adding PostgreSQL to launchd&lt;/h4&gt;


	&lt;p&gt;If you&amp;#8217;d like to have PostgreSQL automatically startup after a system restart, you can load it into launchd, which comes with &lt;span class="caps"&gt;OS X&lt;/span&gt;. By running the following command, PostgreSQL will startup automatically on the next system restart.&lt;/p&gt;


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

	&lt;h4&gt;Adding PostgreSQL to your $PATH&lt;/h4&gt;


	&lt;p&gt;For some reason, the MacPort for PostgreSQL doesn&amp;#8217;t get the programs in your path automatically, so we&amp;#8217;ll it now.&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;mate /etc/profile&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Modify the &lt;code&gt;PATH&lt;/code&gt; that we changed earlier to include /opt/local/lib/postgresql83/bin@.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/lib/postgresql83/bin:$PATH&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Save the file and then open a new terminal. To test this, you should get the following output when you run which &lt;code&gt;psql&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  $ which psql
  /opt/local/lib/postgresql83/bin/psql    
&lt;/code&gt;&lt;/pre&gt;

	&lt;h4&gt;Creating a new PostgreSQL user&lt;/h4&gt;


	&lt;p&gt;When I’m working on Rails applications in my development environment, I really don’t want to have to specify a username and password in every &lt;code&gt;config/database.yml&lt;/code&gt; file for each of our ongoing client projects. When PostgreSQL was installed, it created a superuser named &lt;strong&gt;postgres&lt;/strong&gt;, which is great, but I’d like one that matches my system username, so that I’m not prompted at all for a username or password to connect to PostgreSQL.&lt;/p&gt;


	&lt;p&gt;To do this, we’ll use the &lt;code&gt;createuser&lt;/code&gt; command, which comes with PostgreSQL. As you can see, I’m creating a new user with &lt;code&gt;superuser&lt;/code&gt; privileges (and will hopefully be the last time I have to do a &lt;code&gt;-U postgres&lt;/code&gt;).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  $ createuser --superuser robbyrussell -U postgres
  CREATE ROLE    
&lt;/code&gt;&lt;/pre&gt;

Let’s take a quick moment to test this out.
&lt;pre&gt;&lt;code&gt;
  # create a new database
  $ createdb my_test_db
  CREATE DATABASE

  # drop the database
  $ dropdb my_test_db
  DROP DATABASE
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, everything looks good here.&lt;/p&gt;


	&lt;p&gt;We now have a running installation of PostgreSQL with a new user account. All we need to do now is install the appropriate RubyGem to allow our Ruby applications to connect to it.&lt;/p&gt;


	&lt;h4&gt;Installing PostgreSQL Libraries for Ruby&lt;/h4&gt;


	&lt;p&gt;You can install postgres gem by running the following command.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$  sudo gem install --include-dependencies postgres&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great. We’ve now built a professional development environment for working with Ruby on Rails. Can you &lt;em&gt;feel&lt;/em&gt; the excitement? :-)&lt;/p&gt;


	&lt;h2&gt;Closing Thoughts&lt;/h2&gt;


	&lt;p&gt;Like the previous versions, I hope that a few people find this useful. I didn&amp;#8217;t have to make a lot of changes from the second edition, but there were enough to warrant a new post. I&amp;#8217;ve been setting up my workstation like this for about three years now and I&amp;#8217;m looking forward to seeing how a fresh install on Leopard works out for me.&lt;/p&gt;


	&lt;p&gt;If you have any problems, feel free to ask a question in the comments below.&lt;/p&gt;</description>
      <pubDate>Tue, 22 Jan 2008 11:55:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:73dcd126-1333-417e-9203-aaefb22a65b1</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>postgresql</category>
      <category>xcode</category>
      <category>apple</category>
      <category>osx</category>
      <category>macports</category>
      <category>ruby</category>
      <category>rubygems</category>
      <category>irb</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>PGCon 2008 - Call for Papers</title>
      <description>&lt;p&gt;Are you using &lt;a href="http://postgresql.org"&gt;PostgreSQL&lt;/a&gt; (the world&amp;#8217;s most awesome open-source database server) with &lt;a href="http://rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt;? Do you have any interesting experiences that you might want to share with an audience? Well, you might consider submitting a talk proposal for PGCon 2008, which is taking place in Ottawa, Canada.&lt;/p&gt;


	&lt;p&gt;Details follow&amp;#8230;&lt;/p&gt;


	&lt;h2&gt;PGCon 2008&lt;/h2&gt;


	&lt;p&gt;PGCon 2008 will be held 22-23 May 2008, in Ottawa at the University of
Ottawa.  It will be preceded by two days of tutorials on 20-21 May
2008.&lt;/p&gt;


	&lt;p&gt;We are now requesting proposals for presentations.&lt;/p&gt;


	&lt;p&gt;If you are doing something interesting with PostgreSQL, please submit
a proposal.  You might be one of the backend hackers or work on a
PostgreSQL related project and want to share your know-how with
others. You might be developing an interesting system using
PostgreSQL as the foundation. Perhaps you migrated from another
database to PostgreSQL and would like to share details.  These, and
other stories are welcome. Both users and developers are encouraged
to share their experiences.&lt;/p&gt;


	&lt;p&gt;Here are a few ideas to jump start your proposal process:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;novel, unique or complex ways in which PostgreSQL are used&lt;/li&gt;
		&lt;li&gt;migration of production systems to PostgreSQL&lt;/li&gt;
		&lt;li&gt;data warehousing with PostgreSQL&lt;/li&gt;
		&lt;li&gt;tuning PostgreSQL for different work loads&lt;/li&gt;
		&lt;li&gt;replicating data on top of PostgreSQL&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Both users and developers are encouraged to share their experiences.&lt;/p&gt;


	&lt;p&gt;The schedule is:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;19 Dec 2007 Proposal acceptance begins&lt;/li&gt;
		&lt;li&gt;19 Jan 2008 Proposal acceptance ends&lt;/li&gt;
		&lt;li&gt;19 Feb 2008 Confirmation of accepted proposals&lt;/li&gt;
		&lt;li&gt;19 Apr 2008 Final papers/slides must arrive no later than this date&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;See also &lt;a href="http://www.pgcon.org/2008/papers.php"&gt;http://www.pgcon.org/2008/papers.php&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Instructions for submitting a proposal to PGCon 2008 are available
from: &lt;a href="http://www.pgcon.org/2008/submissions.php"&gt;http://www.pgcon.org/2008/submissions.php&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;This&lt;/p&gt;
</description>
      <pubDate>Fri, 28 Dec 2007 10:58:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:77bc4f6f-b27a-4e11-8298-31a70f57809c</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/12/28/pgcon-2008-call-for-papers</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>PostgreSQL</category>
      <category>postgresql</category>
      <category>ruby</category>
      <category>rubyonrails</category>
      <category>rails</category>
      <category>conference</category>
    </item>
    <item>
      <title>Get to Know a Gem: Rak</title>
      <description>&lt;p&gt;A few months ago, I posted about an article that showed you &lt;a href="http://www.robbyonrails.com/articles/2007/10/06/spice-up-your-terminal-with-colored-grep-pattern-results"&gt;how to colorize your grep search results&lt;/a&gt;. Since then, I&amp;#8217;ve heard people talking about &lt;a href="http://petdance.com/ack/"&gt;ack&lt;/a&gt;, which describes itself as&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;a tool like grep, aimed at programmers with large trees of heterogeneous source code.&amp;#8221;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;It&amp;#8217;s written in Perl, which is fine and dandy&amp;#8230; but before I installed it, I heard that there was a Ruby version named &lt;a href="http://rak.rubyforge.org/"&gt;rak&lt;/a&gt;, which describes itself as&amp;#8230;&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&amp;#8220;a grep replacement in pure Ruby. It accepts Ruby syntax regular expressions and automatically recurses directories, skipping .svn/, .cvs/, pkg/ and more things you don&amp;#8217;t care about. &amp;#8220;&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;Sounds great. Let&amp;#8217;s see what this thing can do.&lt;/p&gt;


	&lt;h2&gt;Installing rak&lt;/h2&gt;


	&lt;p&gt;Daniel Lucraft, the author of rak, was kind enough to package it up as a Rubygem. So, all we have to do is install it via &lt;code&gt;gem install rak&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
   &amp;gt; sudo gem install rak                                                                                                                                                                                                     
  Password:
  Bulk updating Gem source index for: http://gems.rubyforge.org
  Successfully installed rak-0.8.0
  Installing ri documentation for rak-0.8.0...
  Installing RDoc documentation for rak-0.8.0...
  ~ &amp;gt;
&lt;/code&gt;&lt;/pre&gt;

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


	&lt;h2&gt;Using rak&lt;/h2&gt;


	&lt;p&gt;Now that it&amp;#8217;s installed, we can use Rak by typing &lt;code&gt;rak&lt;/code&gt; from the command line. You&amp;#8217;d typically want to run this from within the root of your application.&lt;/p&gt;


	&lt;p&gt;For example, basic usage would look like the following.&lt;/p&gt;


&lt;code&gt;$ rak search-pattern&lt;/code&gt;

	&lt;p&gt;In my first test, I ran &lt;code&gt;rak README&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://myskitch.com/robbyrussell/rak_output_1-20071211-083456.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Immediately, I see a greater advantage to &lt;code&gt;rak&lt;/code&gt; over using &lt;code&gt;grep&lt;/code&gt; and that&amp;#8217;s because it&amp;#8217;s giving me line numbers for free, which takes remembering a few extra options with grep.&lt;/p&gt;


	&lt;p&gt;Like &lt;code&gt;grep&lt;/code&gt;, we can specify a specific path to search with. For example, we use a view helper named &lt;code&gt;link_to_unimplemented&lt;/code&gt; to help us track actions that aren&amp;#8217;t implemented yet. Looking at a current project, I can run &lt;code&gt;rak link_to_unimplemented app/views&lt;/code&gt; and produce the following results.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://myskitch.com/robbyrussell/terminal__less__160x49-20071211-085748.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m going to keep playing with it, but wanted to help get the word out. If you have any tips on using it, please share them in the comments. :-)&lt;/p&gt;
</description>
      <pubDate>Tue, 11 Dec 2007 11:10:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:ae4ad314-4ef2-4c9d-9388-152a1d7c956c</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/12/11/get-to-know-a-gem-rak</link>
      <category>Ruby</category>
      <category>Programming</category>
      <category>gems</category>
      <category>rubyforge</category>
      <category>rak</category>
      <category>grep</category>
      <category>terminal</category>
      <category>unix</category>
      <category>tip</category>
      <category>development</category>
      <category>code</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Using MacPorts Ruby and Rails after Upgrading to OS X Leopard</title>
      <description>&lt;p&gt;If you previously followed my article, &lt;a href="http://www.robbyonrails.com/articles/2007/06/19/installing-ruby-on-rails-and-postgresql-on-os-x-second-edition"&gt;Installing Ruby on Rails and PostgreSQL on &lt;span class="caps"&gt;OS X&lt;/span&gt;, second edition&lt;/a&gt; and are now upgrading to &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard, you&amp;#8217;ll want to make a few adjustments to your setup.&lt;/p&gt;


	&lt;p&gt;First of all, it&amp;#8217;s great that Apple has decided to provide Ruby on Rails out of the box.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
~ &amp;gt; gem list rails                                                                                                                                                                   
  *** LOCAL GEMS ***

  rails (1.2.3)
      Web-application framework with template engine, control-flow layer,
      and ORM.
&lt;/code&gt;&lt;/pre&gt;

How many gems does it come with?
&lt;pre&gt;&lt;code&gt;
~ &amp;gt; gem list|grep '^[a-z]'|wc -l                                                                                                                                                     
      29
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;It&amp;#8217;s really great that &lt;a href="http://apple.com"&gt;Apple&lt;/a&gt; shipped Leopard pre-installed with 29 gems, especially if you don&amp;#8217;t have your entire Rails stack setup already. In my case and for those that have followed my installation process, you don&amp;#8217;t need to switch over to this new development stack (yet). I have a lot of time invested in my fully-functionaly MacPorts installation process (PostgreSQL, MySQL, RMagick, Subversion, Git, etc. Since this all working fine on my machine, I&amp;#8217;m not ready to make the switch to Apple&amp;#8217;s installation.&lt;/p&gt;


	&lt;h2&gt;Don&amp;#8217;t Fix it&amp;#8230; if it&amp;#8217;s not broken!&lt;/h2&gt;


	&lt;p&gt;So, the the first thing that I did was modify my &lt;code&gt;PATH&lt;/code&gt; environment variable, which has &lt;code&gt;/usr/bin&lt;/code&gt; as the first path that it&amp;#8217;ll look at when you try to run commands like &lt;code&gt;ruby&lt;/code&gt;, &lt;code&gt;mongrel_rails&lt;/code&gt;, &lt;code&gt;gem&lt;/code&gt;, etc. You&amp;#8217;ll want to modify this and prepend &lt;code&gt;/opt/local/bin:&lt;/code&gt; to the front of &lt;code&gt;PATH&lt;/code&gt; in your shell configuration. If you&amp;#8217;re using bash, this would be&amp;#8230; &lt;code&gt;~/.bashrc&lt;/code&gt;. If you&amp;#8217;re using zshell like me, &lt;code&gt;~/.zshrc&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Now, when you start a new Terminal and run &lt;code&gt;gem list&lt;/code&gt;, you&amp;#8217;ll see all of the gems that you already have installed.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
~ &amp;gt; gem list rails                                                                                                                                   &amp;lt; new-host

*** LOCAL GEMS ***

rails (1.2.5, 1.2.4, 1.2.3, 1.1.6)
    Web-application framework with template engine, control-flow layer,
    and ORM.
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Back to my happy gems&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
~ &amp;gt; gem list|grep '^[a-z]'|wc -l                                                                                                                                                              &amp;lt; new-host
      72
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great! Now I can get back to work and spend time playing with the new features in Finder, Mail.app, and iChat instead of installing all of the software dependencies that our development projects have. :-)&lt;/p&gt;
</description>
      <pubDate>Sat, 27 Oct 2007 05:43:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4c96e766-87e4-41f4-9d7d-54fe826ed4e9</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/10/27/using-macports-ruby-and-rails-after-upgrading-to-os-x-leopard</link>
      <category>RubyURL</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>rails</category>
      <category>ruby</category>
      <category>gems</category>
      <category>rubyonrails</category>
      <category>osx</category>
      <category>DRY</category>
      <category>macports</category>
      <category>leopard</category>
      <category>zsh</category>
      <category>bash</category>
      <category>rmagick</category>
    </item>
    <item>
      <title>Rails Development Performance Tip - dev_mode_performance_fixes</title>
      <description>&lt;p&gt;When you&amp;#8217;re running a Rails application in development mode, you might notice that it takes a little longer for requests to get processed and this is somewhat intentional as the framework is was designed to allow you to run the application and make live changes to it. This way you can do some basic functional tests from your web browser, work on &lt;span class="caps"&gt;HTML&lt;/span&gt;/CSS changes, or anything else that might need to be done in development mode.&lt;/p&gt;


	&lt;p&gt;Anyhow, this can be slow from time to time and if you&amp;#8217;ve done much Ajax work, you might be familiar with how slow this can feel when performing some basic tasks. Well, thanks to &lt;a href="http://www.workingwithrails.com/person/5337-josh-goebel"&gt;Josh Goebel&lt;/a&gt;, we can speed up things with a new plugin he just released.&lt;/p&gt;


	&lt;p&gt;To install via piston:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;cd vendor/plugins; piston import http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;To install via &lt;code&gt;script/plugin&lt;/code&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;./script/plugin install http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Josh has posted some &lt;a href="http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/BENCHMARKS"&gt;benchmarks&lt;/a&gt; and in my totally basic tests&amp;#8230; shows &lt;strong&gt;about four times (4x) speed improvement for reqs/sec&lt;/strong&gt;!&lt;/p&gt;


	&lt;p&gt;How does it work? From what I can tell, it works somewhat like &lt;a href="http://www.zenspider.com/ZSS/Products/ZenTest/#rsn"&gt;autotest&lt;/a&gt;, in that keeps things cached and when it sees files modified, it re-caches the changes. He&amp;#8217;s made it so that the stack doesn&amp;#8217;t need to reload for each request, which is quite slow.&lt;/p&gt;


	&lt;p&gt;Since it&amp;#8217;s development-mode only, I&amp;#8217;d encourage you to install it and give it a whirl.&lt;/p&gt;


	&lt;p&gt;Have Fun!&lt;/p&gt;
</description>
      <pubDate>Tue, 28 Aug 2007 21:57:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3886af4d-eb92-42ae-b5db-5b7f7f32fe34</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/08/28/rails-development-performance-tip-dev_mode_performance_fixes</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>ruby</category>
      <category>performance</category>
      <category>development</category>
    </item>
    <item>
      <title>RubyURL bookmarklet 2.0</title>
      <description>&lt;p&gt;If you&amp;#8217;re using the bookmarklet for RubyURL, you will want to update it with the latest version as there was apparently &lt;a href="http://planetargon.lighthouseapp.com/projects/4059-rubyurl/tickets/6"&gt;a bug in the JavaScript&lt;/a&gt; and some URLs would fail to redirect properly. Thanks to the help of Jerome, this is now fixed.&lt;/p&gt;


	&lt;p&gt;So, head over to &lt;a href="http://rubyurl.com"&gt;RubyURL&lt;/a&gt; and update your bookmarket. Not sure what I&amp;#8217;m talking about? &lt;a href="http://www.screencast.com/t/PnKFZ0Ji"&gt;Watch the video&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Tue, 28 Aug 2007 10:51:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1c8bfbf8-00e7-45f8-b98b-791ae4e912e6</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/08/28/rubyurl-bookmarklet-2-0</link>
      <category>RubyURL</category>
      <category>bug</category>
      <category>bookmarklet</category>
      <category>ruby</category>
      <category>rubyurl</category>
    </item>
    <item>
      <title>Installing Ruby on Rails and PostgreSQL on OS X, Second Edition</title>
      <description>&lt;p&gt;It&amp;#8217;s been just over a year since I posted the article, &lt;a href="http://www.robbyonrails.com/articles/2006/05/29/install-ruby-rails-and-postgresql-on-osx"&gt;Install Ruby, Rails, and PostgreSQL on &lt;span class="caps"&gt;OSX&lt;/span&gt;&lt;/a&gt; and it still gets quite a bit of traffic. Unfortunately, there have been a few changes in the install process that have caught people.&lt;/p&gt;


	&lt;p&gt;Today, I am leaving my PowerBook G4. It&amp;#8217;s being replaced with a MacBook because the logic board is on the fritz. So, guess what that means? I get to install Ruby, Ruby on Rails, PostgreSQL on &lt;span class="caps"&gt;OS X&lt;/span&gt; again! I figured that I would post a revised version of my previous article for those who may go through this same process in the near future.&lt;/p&gt;


&lt;div class="warning"&gt;
&lt;strong&gt;&lt;span class="caps"&gt;&lt;span class="caps"&gt;WARNING&lt;/span&gt;&lt;/span&gt;:&lt;/strong&gt; This post contains some outdated instructions. Please read &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 and PostgreSQL on &lt;span class="caps"&gt;&lt;span class="caps"&gt;OS X&lt;/span&gt;&lt;/span&gt;, Third Edition&lt;/a&gt;, which is focused on Installing Ruby on Rails on Leopard.
&lt;/div&gt;
&lt;h2&gt;Step Zero: Install iTerm (optional)&lt;/h2&gt;


	&lt;p&gt;You&amp;#8217;ll spend a lot of time in your terminal as a Rails developer. I&amp;#8217;m not a big fan of Terminal.app as it lacks tabbed windows&lt;sup&gt;&lt;a href="#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt; and you&amp;#8217;ll often find me with around ten tabs open. I&amp;#8217;ve been using &lt;a href="http://iterm.sourceforge.net/"&gt;iTerm&lt;/a&gt; for a few years and it&amp;#8217;s definitely improved in the past year and doesn&amp;#8217;t seem to crash nearly as often as it used to.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://iterm.sourceforge.net/download.shtml"&gt;Download the latest iTerm release&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Once installed, I always change the default color scheme as I prefer the white on black schema. The menus in iTerm are lacking some thoughtful interaction design, but I&amp;#8217;ve figured out the right way to do it (after a long time of stumbling on it by accident). In iTerm, you&amp;#8217;ll want to &lt;strong&gt;edit&lt;/strong&gt; the Default bookmark, which you can access by going to Manage Bookmarks under the Bookmarks Menu.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.robbyonrails.com/files/ror_osx_iterm_bookmark.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Set the &lt;strong&gt;Display&lt;/strong&gt; value to &lt;strong&gt;classic iTerm&lt;/strong&gt; and you&amp;#8217;re golden.&lt;/p&gt;


	&lt;p&gt;Now&amp;#8230; let&amp;#8217;s get to business&amp;#8230;&lt;/p&gt;


	&lt;h2&gt;Step 1: Install Xcode Tools&lt;/h2&gt;


	&lt;p&gt;Without installing Xcode tools from Apple, we&amp;#8217;re not going to get very far. First, you&amp;#8217;ll need to grab a copy of Xcode, which you can download on Apple&amp;#8217;s Developer Connection site. It&amp;#8217;s almost a 1GB download, so you&amp;#8217;ll want to start your download and use your multi-tasking skills and &lt;a href="http://drinkviso.com/"&gt;grab a Viso&lt;/a&gt;, read some &lt;a href="http://www.planetrubyonrails.org"&gt;blog&lt;/a&gt; &lt;a href="http://therailsway.com/"&gt;posts&lt;/a&gt;.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://developer.apple.com/tools/download/"&gt;Download Xcode&lt;/a&gt; (dmg)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I&amp;#8217;m going to make the assumption here that you know how to install a dmg on osx. Once this is installed, you can move on to the next step!&lt;/p&gt;


	&lt;h2&gt;Step 2: All Your MacPorts are Belong to Us&lt;/h2&gt;


	&lt;p&gt;&lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt; (formerly known as DarwinPorts) is a package management system for &lt;span class="caps"&gt;OS X&lt;/span&gt;. This is what we&amp;#8217;ll use to install most of the necessary programs to develop and run your Ruby on Rails applications. 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&amp;#8230; 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 MacPorts and install the dmg file.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.robbyonrails.com/files/ror_osx_macports.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;Now that this is installed, we should test it.&lt;/p&gt;


	&lt;p&gt;With a new terminal, run the following:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ port version
Version: 1.442
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Success! Let&amp;#8217;s get going&amp;#8230;&lt;/p&gt;


	&lt;h2&gt;Step 3: Installing the Ruby on Rails development stack&lt;/h2&gt;


	&lt;p&gt;We&amp;#8217;re going to go through a series of small steps, which may take some time depending on how fast your internet connection and computer is.&lt;/p&gt;


	&lt;h3&gt;Install Ruby and RubyGems&lt;/h3&gt;


	&lt;p&gt;In order to install Ruby, we&amp;#8217;re going to use MacPorts with the &lt;code&gt;port&lt;/code&gt; command, which is now available for installing various packages on our &lt;span class="caps"&gt;OS X&lt;/span&gt; machines.&lt;/p&gt;


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

	&lt;p&gt;It&amp;#8217;ll probably take a while to download and install Ruby and all of it&amp;#8217;s known dependencies. In the meantime, check out &lt;a href="http://lolcode.com/"&gt;some funny code&lt;/a&gt;. &lt;span class="caps"&gt;KTHXBYE&lt;/span&gt;!&lt;/p&gt;


	&lt;p&gt;Still waiting for it to install, perhaps you could do something like&amp;#8230; begin writing a comment on this post, writing your own blog post, &lt;a href="http://www.youtube.com/watch?v=sLD0SNCFtyA"&gt;watch a funny video&lt;/a&gt;, or &lt;a href="http://workingwithrails.com/recommendation/new/person/5408-robby-russell"&gt;recommend me&lt;/a&gt;. I walked to &lt;a href="http://www.backspace.bz/"&gt;Backspace&lt;/a&gt; with Gary to get an Americano&amp;#8230; and it&amp;#8217;s still not done. :-p&lt;/p&gt;


	&lt;p&gt;(minutes/hours/weeks later)&lt;/p&gt;


	&lt;p&gt;Okay&amp;#8230; I trust that it finished installing Ruby and RubyGems without any hiccups. Let&amp;#8217;s test them from our terminal to make sure.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s check the version&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.9.1]
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, let&amp;#8217;s make sure that Ruby is working properly&amp;#8230;&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;
$ irb
irb(main):001:0&amp;gt; x = 1     
=&amp;gt; 1
irb(main):002:0&amp;gt; puts "wee!!!" if x == 1
wee!!!
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, we&amp;#8217;re on a roll. Let&amp;#8217;s get the rest of the stack installed.&lt;/p&gt;


	&lt;h3&gt;Install Ruby on Rails&lt;/h3&gt;


	&lt;p&gt;We&amp;#8217;re going to install Ruby on Rails with the &lt;code&gt;gem&lt;/code&gt; command that installing RubyGems provided.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo gem install -y rails
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This command should produce an output similar to the following.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
Successfully installed rails-1.2.3
Successfully installed rake-0.7.3
Successfully installed activesupport-1.4.2
Successfully installed activerecord-1.15.3
Successfully installed actionpack-1.13.3
Successfully installed actionmailer-1.3.3
Successfully installed actionwebservice-1.2.3
Installing ri documentation for rake-0.7.3...
Installing ri documentation for activesupport-1.4.2...
Installing ri documentation for activerecord-1.15.3...
Installing ri documentation for actionpack-1.13.3...
Installing ri documentation for actionmailer-1.3.3...
Installing ri documentation for actionwebservice-1.2.3...
Installing RDoc documentation for rake-0.7.3...
Installing RDoc documentation for activesupport-1.4.2...
Installing RDoc documentation for activerecord-1.15.3...
Installing RDoc documentation for actionpack-1.13.3...
Installing RDoc documentation for actionmailer-1.3.3...
Installing RDoc documentation for actionwebservice-1.2.3...    
&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Install Rails-friendly gems&lt;/h3&gt;


	&lt;p&gt;&lt;strong&gt;Mongrel&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re developing with Rails, it&amp;#8217;s highly recommended that you use install and use &lt;a href="http://mongrel.rubyforge.org"&gt;Mongrel&lt;/a&gt; for your development and production environments. The following command will install the mongrel and mongrel_cluster gems (including their dependencies).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo gem install -y mongrel mongrel_cluster&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&lt;small&gt;* Note: Be sure to select the proper platform for mongrel. (hint: &lt;span class="caps"&gt;OS X&lt;/span&gt; is &lt;span class="caps"&gt;NOT&lt;/span&gt; mswin32)&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;My terminal output:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo gem install -y mongrel mongrel_cluster
Password:
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i686-darwin8.9.1)
 1. mongrel 1.0.1 (mswin32)
 2. mongrel 1.0.1 (ruby)
 3. mongrel 1.0 (mswin32)
 4. mongrel 1.0 (ruby)
 5. Skip this gem
 6. Cancel installation
&amp;gt; 2
Select which gem to install for your platform (i686-darwin8.9.1)
 1. fastthread 1.0 (ruby)
 2. fastthread 1.0 (mswin32)
 3. fastthread 0.6.4.1 (mswin32)
 4. fastthread 0.6.4.1 (ruby)
 5. Skip this gem
 6. Cancel installation
&amp;gt; 1
Building native extensions.  This could take a while...
Building native extensions.  This could take a while...
Successfully installed mongrel-1.0.1
Successfully installed daemons-1.0.6
Successfully installed fastthread-1.0
Successfully installed gem_plugin-0.2.2
Successfully installed cgi_multipart_eof_fix-2.1
Installing ri documentation for mongrel-1.0.1...
Installing ri documentation for daemons-1.0.6...
Installing ri documentation for gem_plugin-0.2.2...
Installing ri documentation for cgi_multipart_eof_fix-2.1...
Installing RDoc documentation for mongrel-1.0.1...
Installing RDoc documentation for daemons-1.0.6...
Installing RDoc documentation for gem_plugin-0.2.2...
Installing RDoc documentation for cgi_multipart_eof_fix-2.1...
Successfully installed mongrel_cluster-0.2.1    
&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Step 4: Installing the World&amp;#8217;s Most Advanced Database Server&amp;#8230; PostgreSQL!&lt;/h2&gt;


	&lt;p&gt;At &lt;a href="http://planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt;, we develop our applications on top of &lt;a href="http://postgresql.or"&gt;PostgreSQL&lt;/a&gt;. I&amp;#8217;ve long been advocating the adoption of this &lt;em&gt;awesome&lt;/em&gt; open source database in the Rails community. Just over a year ago, &lt;a href="http://jvoorhis.com"&gt;Jeremy Voorhis&lt;/a&gt; (PLANET &lt;span class="caps"&gt;ARGON&lt;/span&gt; alumnus) and I were &lt;a href="http://odeo.com/audio/1069086/view"&gt;interviewed on the Ruby on Rails podcast&lt;/a&gt; and had the opportunity to discuss our preference of PostgreSQL over the alternatives (mysql, sqlite, firebird, etc.).&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re going to install &lt;a href="http://www.postgresql.org/docs/8.2/static/release-8-2.html"&gt;PostgreSQL 8.2&lt;/a&gt; from MacPorts by running the following command.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo port install postgresql82 postgresql82-server&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;While this is installing, you might take a moment to check out &lt;a href="http://whytheluckystiff.net/comics/differentSpaceShuttles.html"&gt;some space shuttles&lt;/a&gt;.&lt;/p&gt;


	&lt;h3&gt;Setting up PostgreSQL&lt;/h3&gt;


	&lt;p&gt;You may have noticed the output of the previous port installation of PostgreSQL 8.2, suggested that you do the following. Let&amp;#8217;s do that now&amp;#8230;&lt;/p&gt;


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

	&lt;h4&gt;Have PostgreSQL start automatically on system start-ups&lt;/h4&gt;


	&lt;p&gt;Unless you&amp;#8217;re concerned about extra applications running in the background, I&amp;#8217;d encourage you to add PostgreSQL to launchd, which will start it automatically after system reboots.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql82-server.plist&lt;/code&gt;&lt;/pre&gt;

	&lt;h4&gt;Adding PostgreSQL commands to your $PATH&lt;/h4&gt;


	&lt;p&gt;For some reason, MacPorts doesn&amp;#8217;t add the PostgreSQL programs to the default bash &lt;span class="caps"&gt;PATH&lt;/span&gt;, which means that you can&amp;#8217;t run &lt;code&gt;psql&lt;/code&gt;, &lt;code&gt;pg_dump&lt;/code&gt;, or &lt;code&gt;createdb&lt;/code&gt;/&lt;code&gt;dropdb&lt;/code&gt; without specifying the full path to where they were installed. What we&amp;#8217;ll do is add them to our default terminal profile.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo vi /etc/profile&lt;/code&gt;&lt;/pre&gt; (you can use &lt;code&gt;mate&lt;/code&gt;, &lt;code&gt;emacs&lt;/code&gt;, &lt;code&gt;joe&lt;/code&gt; or any other preferred editor to do this)

	&lt;p&gt;This file gets loaded every time a new terminal session is started.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s add &lt;code&gt;/opt/local/lib/postgresql82/bin&lt;/code&gt; to the end of the value for &lt;span class="caps"&gt;PATH&lt;/span&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/lib/postgresql82/bin"    
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Save the file and then open a new terminal. To test this, you should get the following output when you run &lt;code&gt;which psql&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ which psql
/opt/local/lib/postgresql82/bin/psql
&lt;/code&gt;&lt;/pre&gt;

	&lt;h4&gt;Creating a new PostgreSQL user&lt;/h4&gt;


	&lt;p&gt;When I&amp;#8217;m working on Rails applications in my development environment, I really don&amp;#8217;t want to have to specify a username and password in every &lt;code&gt;config/database.yml&lt;/code&gt; file for each of our ongoing client projects. When PostgreSQL was installed, it created a superuser named &lt;code&gt;postgres&lt;/code&gt;, which is great, but I&amp;#8217;d like one that matches my system username, so that I&amp;#8217;m not prompted at all for a username or password to connect to PostgreSQL.&lt;/p&gt;


	&lt;p&gt;To do this, we&amp;#8217;ll use the &lt;code&gt;createuser&lt;/code&gt; command, which comes with PostgreSQL. As you can see, I&amp;#8217;m creating a new user with superuser privileges (and will hopefully be the last time I have to do a -U postgres).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ createuser --superuser robbyrussell -U postgres
CREATE ROLE
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Let&amp;#8217;s take a quick moment to test this out.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
# create a new database
$ createdb my_test_db
CREATE DATABASE

# drop the database
$ dropdb my_test_db
DROP DATABASE
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Great, everything looks good here.&lt;/p&gt;


	&lt;p&gt;We now have a running installation of PostgreSQL with a new user account. All we need to do now is install the appropriate RubyGem to allow our Ruby applications to connect to it.&lt;/p&gt;


	&lt;h3&gt;Installing the Ruby Postgres gem&lt;/h3&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt;: Hydro posted a commented, which lead me to the ruby-postgres gem.&lt;/p&gt;


	&lt;p&gt;You can install ruby-postgres gem by running the following command.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo gem install -y ruby-postgres
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Let&amp;#8217;s take a moment to test that this installed properly.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ irb
irb(main):001:0&amp;gt; require 'rubygems'
=&amp;gt; true
irb(main):002:0&amp;gt; require 'postgres'
=&amp;gt; true
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;If this returns true, than we should be good to go. We&amp;#8217;ve now built a professional development environment for working with Ruby on Rails. &lt;strong&gt;Doesn&amp;#8217;t that feel great?&lt;/strong&gt;&lt;/p&gt;


	&lt;h2&gt;Test your install&lt;/h2&gt;


	&lt;p&gt;You can look back at &lt;a href="http://www.robbyonrails.com/articles/2006/05/29/install-ruby-rails-and-postgresql-on-osx"&gt;my older post&lt;/a&gt; to walk through the process of testing out your setup with a new Rails application.&lt;/p&gt;


	&lt;h2&gt;Closing thoughts&lt;/h2&gt;


	&lt;p&gt;I hope that this post has been useful for you. It took me a few hours to walk through this process and it&amp;#8217;s how all of our designers and developers at &lt;a href="http://planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; installs and configures their development environment.&lt;/p&gt;


	&lt;p&gt;We also install the following programs on new machines.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://macromates.com/"&gt;TextMate&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;Subversion: &lt;code&gt;sudo port install subversion&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;RSpec: &lt;code&gt;sudo gem install -y rspec&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;...amongst other gems that are needed on specific projects&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Until next time&amp;#8230; have fun!&lt;/p&gt;


	&lt;p id="fn1"&gt;&lt;sup&gt;1&lt;/sup&gt; Rumor: Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard will give Terminal.app tabs! (&lt;a href="http://www.apple.com/macosx/leopard/technology/unix.html"&gt;see screenshot&lt;/a&gt;)&lt;/p&gt;</description>
      <pubDate>Tue, 19 Jun 2007 13:54:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:99f3a321-f222-4716-b70e-f62fcb7829c1</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/06/19/installing-ruby-on-rails-and-postgresql-on-os-x-second-edition</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>rails</category>
      <category>ruby</category>
      <category>postgresql</category>
      <category>subversion</category>
      <category>irb</category>
      <category>rubyonrails</category>
      <category>osx</category>
      <category>tutorial</category>
      <category>apple</category>
      <category>rubygems</category>
      <category>xcode</category>
      <category>macports</category>
      <category>macbook</category>
    </item>
    <item>
      <title>All the cool kids are doing it... why aren't you?</title>
      <description>&lt;p&gt;&lt;a href="http://joshknowles.com/"&gt;Josh Knowles&lt;/a&gt; just mentioned an article written by David Chelminsky, titled, &lt;a href="http://blog.davidchelimsky.net/articles/2007/05/14/an-introduction-to-rspec-part-i"&gt;an introduction to RSpec &amp;#8211; Part I&lt;/a&gt;. In this article, David introduces you to some of &lt;a href="http://blog.davidchelimsky.net/articles/2007/03/11/describe-it-with-rspec"&gt;the new language&lt;/a&gt; that appeared in some of the recent versions of &lt;a href="http://rspec.rubyforge.org/"&gt;RSpec&lt;/a&gt; as well as give you a complete tutorial on building some specs.&lt;/p&gt;


	&lt;p&gt;Last night, I had the opportunity to sit down with &lt;a href="http://blog.aslakhellesoy.com/"&gt;Aslak Hellesøy&lt;/a&gt; and &lt;a href="http://blog.davidchelimsky.net/"&gt;David Chelimsky&lt;/a&gt; for a few hours and talk about my experiences of using RSpec at &lt;a href="http://www.planetargon.com/"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; and how it&amp;#8217;s helped us redefine and evolve our process. In particular, how RSpec  has helped us reshape our process of gathering user interaction specifications from our Interaction Design team and business rules from our clients.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re in town and are using RSpec&amp;#8230; or are thinking about using RSpec&amp;#8230; and see these guys&amp;#8230; thank them for all the hard work that they&amp;#8217;re doing&amp;#8230; and of course, if you run into anybody else on &lt;a href="http://rspec.rubyforge.org/team.html"&gt;the team.&lt;/a&gt;.. do the same. :-)&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/robbyrussell/501899079/" title="Photo Sharing"&gt;&lt;img src="http://farm1.static.flickr.com/202/501899079_5fc58f65fc.jpg" width="500" height="333" alt="Aslak Hellesøy and David Chelimsky" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;small&gt;Aslak Hellesøy and David Chelimsky&lt;/small&gt;&lt;/p&gt;


	&lt;p&gt;Also, by the end of the &lt;a href="http://railsconf.org"&gt;conference&lt;/a&gt;... &lt;a href="http://blog.imperialdune.com/"&gt;Graeme&lt;/a&gt; and I are hoping to have a small project done to help encourage more adoption of &lt;a href="http://behaviour-driven.org/"&gt;Behavior-Driven Development&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Thu, 17 May 2007 13:15:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1237cc2b-8b0c-4a6d-bd3d-b32173b169df</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/05/17/all-the-cool-kids-are-doing-it-why-arent-you</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PLANET ARGON</category>
      <category>rspec</category>
      <category>bdd</category>
      <category>aslak</category>
      <category>ruby</category>
      <category>rubyonrails</category>
      <category>railsconf</category>
    </item>
    <item>
      <title>Seattle in late March</title>
      <description>&lt;p&gt;I&amp;#8217;m going to be hanging out in Redmond, WA. late next month&amp;#8230; why? That&amp;#8230; I&amp;#8217;ll explain at a later date. ;-)&lt;/p&gt;


	&lt;p&gt;What I can say is that I&amp;#8217;ll be available on a few evenings if anybody is interested in meeting up to talk shop, which can include anything from &lt;a href="http://dialogue-driven.org"&gt;d3&lt;/a&gt;, &lt;a href="http://rubyonrails.org"&gt;ruby on rails&lt;/a&gt;, &lt;a href="http://behavior-driven.org"&gt;bdd&lt;/a&gt;, &lt;a href="http://www.robbyonrails.com/articles/2006/08/30/agile-interaction-design"&gt;agile interaction design&lt;/a&gt;... to &lt;a href="http://www.bbc.co.uk/comedy/partridge/"&gt;&lt;span class="caps"&gt;BBC&lt;/span&gt; comedy shows&lt;/a&gt;. :-)&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll be flying up from Portland to Seattle on Saturday, March 24th. I&amp;#8217;m going to try and stay downtown for that night&amp;#8230; and then will be staying at Sheraton Bellevue until Tuesday night. So&amp;#8230; Saturday-Monday nights are currently open.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m also planning to head to the monthly &lt;a href="http://seattlerb.rubyforge.org/"&gt;Seattle.rb&lt;/a&gt; meeting on Tuesday, March 27th.&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re interested in meeting up, &lt;a href="mailto:robbyrussell@gmail.com"&gt;drop me a line&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt;  If you&amp;#8217;re taking &lt;a href="http://www.robbyonrails.com/articles/2007/02/08/is-bdd-kinkier-than-tdd"&gt;the &lt;em&gt;kinky&lt;/em&gt; aspect of &lt;span class="caps"&gt;BDD&lt;/span&gt; too serious&lt;/a&gt;... please don&amp;#8217;t email me. ;-)&lt;/p&gt;
</description>
      <pubDate>Tue, 20 Feb 2007 18:35:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:347329ae-d283-4d22-b4a0-e2985dd288d3</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/02/20/seattle-in-late-march</link>
      <category>Business</category>
      <category>PLANET ARGON</category>
      <category>seattle</category>
      <category>travel</category>
      <category>dialogue</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Meet the Cheat</title>
      <description>&lt;p&gt;Hey!  You&amp;#8217;re a cheater!&lt;/p&gt;


	&lt;p&gt;Well, if you&amp;#8217;re not&amp;#8230; I&amp;#8217;m hoping to make one out of you.&lt;/p&gt;


	&lt;blockquote&gt;
		&lt;p&gt;&lt;em&gt;&amp;#8220;A thing worth having is a thing worth cheating for.&amp;#8221;&lt;/em&gt;&amp;#8212;W. C. Fields&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;I&amp;#8217;m a fan of the &lt;span class="caps"&gt;PDF&lt;/span&gt; cheat sheets as I like the consolidated content contained in them. However, I don&amp;#8217;t like having to read PDFs any more than I have to. Printing them isn&amp;#8217;t always ideal either as I really don&amp;#8217;t like to carry around extra paper in my laptop bag. So, what are we to do?&lt;/p&gt;


	&lt;p&gt;Well, you can cheat the system! &lt;em&gt;...and I&amp;#8217;m going to show you how!&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;Cheat is this really nice command-line tool that outputs a plain text cheat sheet whenever and wherever you want.&lt;/p&gt;


	&lt;h2&gt;Install the Cheat&lt;/h2&gt;


	&lt;p&gt;Like all the happy and good Rubygems, this is quite simple&amp;#8230;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ sudo gem install cheat
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Done! Okay&amp;#8230; let&amp;#8217;s try to do some cheating. Don&amp;#8217;t worry, your friends and family will forgive you.&lt;/p&gt;


	&lt;h2&gt;Becoming a Cheat(er)&lt;/h2&gt;


	&lt;p&gt;To view a cheat sheet, just run the cheat command from your favorite terminal window.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ cheat _cheat name_&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;So, for example&amp;#8230; to see the cheat sheet for RSpec, run &lt;code&gt;cheat rspec&lt;/code&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
    $ cheat rspec
    rspec:
      INSTALL
      =======
      $ sudo gem install rspec

      $ ./script/plugin install
      svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/p
      ugins/rspec
      Where X_Y_Z is the version number.

      $ ./script/generate rspec
            create  spec
            create  spec/spec_helper.rb
            create  spec/test2spec.erb
            create  test/test2spec_help.rb
            create  script/rails_spec
            create  script/rails_spec_runner

      HOW TO USE
      ==========
      ./script/generate rspec_model User

####################################################
# truncated to save precious bandwidth
####################################################
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Because this is all printing out in your shell, you can take advantage of your favorite command line tools.&lt;/p&gt;


	&lt;h3&gt;Piping to grep&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;
$ cheat rspec | grep 'equal' 
      @user.errors.on(:username).should_equal "is required" 
  target.should_equal &amp;lt;value&amp;gt;
  target.should_not_equal &amp;lt;value&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Piping to TextMate&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;$ cheat rspec | mate&lt;/code&gt;&lt;/pre&gt;

	&lt;h2&gt;Find more Cheats&lt;/h2&gt;


	&lt;p&gt;Head over to this &lt;a href="http://cheat.errtheblog.com/b"&gt;list of cheats&lt;/a&gt; to see what is currently available.&lt;/p&gt;


	&lt;p&gt;Thanks to the &lt;a href="http://errtheblog.com/"&gt;Err team&lt;/a&gt; for putting this together!&lt;/p&gt;
</description>
      <pubDate>Wed, 10 Jan 2007 12:37:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:a95963ff-b359-40ae-8fe6-8d1741bc7614</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2007/01/10/meet-the-cheat</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>cheat</category>
      <category>gem</category>
      <category>ruby</category>
      <category>documentation</category>
    </item>
    <item>
      <title>The Rails birthday party isn't over!</title>
      <description>&lt;p&gt;Ruby on Rails is two years old now and we&amp;#8217;ve been hosting Rails applications for over a year and a half now!&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.friendsjunction.com/TRCandle.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;To mark this occasion, if you sign up with one of our &lt;a href="http://www.planetargon.com/hosting.html"&gt;Shared Rails Hosting&lt;/a&gt; plans by Friday, August 11th, we&amp;#8217;ll give you an extra month of hosting for free!&lt;/p&gt;


	&lt;p&gt;Our hosting plans start as low as $11.25/month!&lt;/p&gt;


	&lt;p&gt;If you&amp;#8217;re looking for a great place to deploy your Rails application with some of the cutting edge deployment options (mongrel, pound, lighttpd, capistrano, etc&amp;#8230;) take a look at the &lt;a href="http://docs.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt; Documentation Project&lt;/a&gt; to learn more.&lt;/p&gt;


	&lt;p&gt;When signing up for your new account, use the following coupon code: &lt;strong&gt;&lt;span class="caps"&gt;RAILS&lt;/span&gt;.IS.2.YEARS.OLD!&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;To learn more about our hosting options, visit &lt;a href="http://www.planetargon.com/hosting.html"&gt;http://www.planetargon.com/hosting.html&lt;/a&gt; or visit us in our &lt;a href="http://www.planetargon.com/chat.html"&gt;chat room&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Tue, 08 Aug 2006 17:47:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:20f20522-1cb6-47ec-9e15-5b5737eaf400</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/08/08/the-rails-birthday-party-isnt-over</link>
      <category>planetargon</category>
      <category>hosting</category>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Rubyisms in Rails</title>
      <description>&lt;p&gt;I&amp;#8217;m not exactly sure how I failed to post this the other day&amp;#8230; but better late than never.&lt;/p&gt;


	&lt;p&gt;Jacob Harris aka harrisj (my favorite Rubyist on the east coast) has finished his ebook, &lt;a href="http://www.informit.com/bookstore/product.asp?isbn=0321474074&amp;#38;rl=1"&gt;Rubyisms in Rails&lt;/a&gt;, which you can now purchase for &lt;strong&gt;only $9.99!&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.informit.com/buy.asp?isbn=0321474074"&gt;Go buy it&lt;/a&gt;! :-)&lt;/p&gt;
</description>
      <pubDate>Sat, 05 Aug 2006 17:31:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:0ccab706-d9ba-4e9f-87c2-5d92d66f5335</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/08/05/rubyisms-in-rails</link>
      <category>ruby</category>
      <category>rails</category>
      <category>ebook</category>
    </item>
    <item>
      <title>Go Ruby Go!</title>
      <description>&lt;p&gt;Allison Beckwith forwarded me an email that she got from &lt;a href="http://www.powells.com"&gt;Powells.com&lt;/a&gt; (our favorite independent bookstore)... check out their &lt;a href="http://www.powells.com/techbest.html"&gt;top technical books&lt;/a&gt; right now!&lt;/p&gt;


	&lt;h2&gt;&lt;span class="caps"&gt;TECH BESTSELLERS&lt;/span&gt;&lt;/h2&gt;


	&lt;ol&gt;
	&lt;li&gt;&amp;#8220;The Ruby Cookbook&amp;#8221; by Lucas Carlson (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Agile Web Development with Rails&amp;#8221; by Dave Thomas (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Ubuntu Hacks&amp;#8221; by Jonathan Oxer (Unix)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Programming Ruby&amp;#8221; by Dave Thomas (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Rails Recipes&amp;#8221; by Chad Fowler (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Perl Hacks&amp;#8221; by chromatic (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Higher-Order Perl&amp;#8221; by Mark Jason Dominus (Computer Languages)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Mind Performance Hacks&amp;#8221; by Ron Hale-Evans (Popular Science)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Mind Hacks&amp;#8221; by Tom Stafford (Popular Science)&lt;/li&gt;
		&lt;li&gt;&amp;#8220;Ajax Design Patterns&amp;#8221; by Michael Mahemoff (Internet)&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;This includes both online and in-store purchases. We&amp;#8217;re lucky at &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; as we&amp;#8217;re only about 4 blocks from their technical book store. ;-)&lt;/p&gt;


	&lt;p&gt;You&amp;#8217;ll also notice that the Ruby books are selling more than the Perl books&amp;#8230; Tim O&amp;#8217;Reilly &amp;#8220;blogged &lt;a href="http://radar.oreilly.com/archives/2006/07/ruby_book_sales_pass_perl.html"&gt;about this&lt;/a&gt; the other day.&lt;/p&gt;


	&lt;p&gt;Congrats on hitting #1 Lucas!&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;mental note: ...better hurry and finish my book!&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Wed, 02 Aug 2006 19:14:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:38489bb4-0c6b-4099-9b07-6fe7c71d407d</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/08/02/go-ruby-go</link>
      <category>ruby</category>
      <category>books</category>
      <category>powells</category>
    </item>
    <item>
      <title>Install Ruby, Rails, and PostgreSQL on OSX</title>
      <description>&lt;div class="warning"&gt;
&lt;strong&gt;&lt;span class="caps"&gt;WARNING&lt;/span&gt;:&lt;/strong&gt; This post contains some outdated instructions. Please read &lt;a href="http://www.robbyonrails.com/articles/2007/06/19/installing-ruby-on-rails-and-postgresql-on-os-x-second-edition"&gt; Installing Ruby on Rails and PostgreSQL on &lt;span class="caps"&gt;OS X&lt;/span&gt;, Second Edition&lt;/a&gt;.
&lt;/div&gt;

	&lt;p&gt;Our Creative Director, Allison Beckwith, picked up a new black MacBook this weekend and I had the luxury of getting it setup to model our standard setup. We all try to keep our setups fairly similar so that we don&amp;#8217;t hit too many issues when working together on projects.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll try to keep this short and to the point&amp;#8230; because if you&amp;#8217;re like me&amp;#8230; you just want to start playing with Rails! ;-)&lt;/p&gt;


	&lt;p&gt;The steps I followed to get her setup like the rest of the development team at &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; went something like this.&lt;/p&gt;


	&lt;h3&gt;XCode and DarwinPorts&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Download and install &lt;a href="http://iterm.sf.net/"&gt;iterm&lt;/a&gt; (the Universal dmg)&lt;/li&gt;
		&lt;li&gt;Download and install XCode tools from Apple (dmg)&lt;/li&gt;
		&lt;li&gt;Download and install &lt;a href="http://darwinports.opendarwin.org/"&gt;DarwinPorts&lt;/a&gt; (dmg)&lt;/li&gt;
		&lt;li&gt;Start up iterm.&lt;/li&gt;
	&lt;/ul&gt;


In this step we are going to modify the default bash profile so that every user on the machine that uses bash will get the path for darwinports in their bash_profile.
&lt;pre&gt;&lt;code&gt;sudo vi /etc/profile&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Modify the following line to include &lt;code&gt;/opt/local/bin&lt;/code&gt; in the &lt;span class="caps"&gt;PATH&lt;/span&gt;&amp;#8230; save the file (see vim documentation for details)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  PATH="/bin:/sbin:/opt/local/bin:/usr/bin:/usr/sbin" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Ruby and Rails&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Open up a new iterm tab (apple-t)&lt;/li&gt;
		&lt;li&gt;Install ruby with darwinports with: &lt;code&gt;sudo port install ruby rb-rubygems&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install Ruby on Rails and all its dependencies with: &lt;code&gt;sudo gem install -y rails&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;h3&gt;PostgreSQL and Ruby libs&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Install PostgreSQL8 with: &lt;code&gt;sudo port install postgresql8&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;We need to modify the &lt;code&gt;/etc/profile&lt;/code&gt; file again because the postgresql8 install doesn&amp;#8217;t add programs like pg_ctl to /opt/local/bin. Change the &lt;span class="caps"&gt;PATH&lt;/span&gt; to now look like this and save.&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
  PATH="/bin:/sbin:/opt/local/bin:/usr/bin:/usr/sbin:/opt/local/lib/pgsql8/bin" 
&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;Install the &lt;strong&gt;postgres&lt;/strong&gt; gem with: &lt;code&gt;sudo gem install postgres&lt;/code&gt;
	&lt;ul&gt;
	&lt;li&gt;Oh NO!!! You should see an error about it not finding libraries&amp;#8230; what will we do?&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
  cd /opt/local/lib/ruby/gems/1.8/gems/postgres-0.7.1
  sudo ruby extconf.rb --with-pgsql-include=/opt/local/include/pgsql8 --with-pgsql-lib=/opt/local/lib/pgsql8
  sudo make &amp;#38;&amp;#38; sudo make install
  # for good measure...
  sudo gem install postgres
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&lt;strong&gt;Successfully installed postgres-0.7.1&lt;/strong&gt;&lt;/p&gt;


	&lt;h3&gt;Configure PostgreSQL for single user&lt;/h3&gt;


	&lt;p&gt;In our development environments, we don&amp;#8217;t find it necessary to keep PostgreSQL running all the time on our servers. We only want it running when we&amp;#8217;re doing development. We also typically install it per user on a machine to keep us from needing things like usernames and passwords to connect to it from an application we&amp;#8217;re running on the machine. Let&amp;#8217;s setup PostgreSQL the &lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt; way!&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Open up iterm and go to your home directory&lt;/li&gt;
		&lt;li&gt;Init your new PostgreSQL database with: &lt;code&gt;initdb -D pgdata&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Start up PostgreSQL with: &lt;code&gt;pg_ctl -D pgdata -l pgdata/psql.log start&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Create a new database with: &lt;code&gt;createdb argon_development&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Test the new database with: &lt;code&gt;psql argon_development&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Did it load up your new database? If so, great! If not&amp;#8230; check your steps&amp;#8230; :-)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Test Rails + PostgreSQL&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Navigate to a directory where you don&amp;#8217;t mind sticking projects&amp;#8230; &lt;code&gt;mkdir development; cd development&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Generate a new Rails application with: &lt;code&gt;rails -d postgresql argon&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Navigate to new Rails application directory. &lt;code&gt;cd argon&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Generate a new model to test with: &lt;code&gt;./script/generate model Argonista&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Edit and save the migration that was generated ( &lt;code&gt;db/migrate/001_create_argonistas.rb&lt;/code&gt; ) file with your favorite editor&amp;#8230;&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
  class CreateArgonistas &amp;lt; ActiveRecord::Migration
    def self.up
      create_table :argonistas do |t|
        t.column :name, :string
        t.column :blog_url, :string
      end
    end

    def self.down
      drop_table :argonistas
    end
  end
&lt;/code&gt;&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;Edit &lt;code&gt;config/database.yml&lt;/code&gt; to look like the following&amp;#8230; you&amp;#8217;ll notice that we don&amp;#8217;t need to supply a username or password.&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre&gt;&lt;code&gt;
  development:
    adapter: postgresql
    database: argon_development

  test:
    adapter: postgresql 
    database: argon_test

  production:
    adapter: postgresql
    database: argon_production
&lt;/code&gt;&lt;/pre&gt;

* Run the migration with: &lt;code&gt;rake db:migrate&lt;/code&gt;
&lt;pre&gt;&lt;code&gt;
  $ rake db:migrate
  (in /Users/allisonbeckwith/development/argon)
  == CreateArgonistas: migrating ================================================
  -- create_table(:argonistas)
  NOTICE:  CREATE TABLE will create implicit sequence "argonistas_id_seq" for serial column "argonistas.id" 
  NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "argonistas_pkey" for table "argonistas" 
     -&amp;gt; 0.0399s
  == CreateArgonistas: migrated (0.0402s) =======================================
&lt;/code&gt;&lt;/pre&gt;

* Test your new model from console
&lt;pre&gt;&lt;code&gt;
  $ ./script/console 
  Loading development environment.
  &amp;gt;&amp;gt; a = Argonista.new
  =&amp;gt; #&amp;lt;Argonista:0x24569dc @attributes={"name"=&amp;gt;nil, "blog_url"=&amp;gt;nil}, @new_record=true&amp;gt;
  &amp;gt;&amp;gt; a.name = 'Robby'
  =&amp;gt; "Robby" 
  &amp;gt;&amp;gt; a.blog_url = 'http://www.robbyonrails.com'
  =&amp;gt; "http://www.robbyonrails.com" 
  &amp;gt;&amp;gt; a.save
  =&amp;gt; true
  &amp;gt;&amp;gt; exit
&lt;/code&gt;&lt;/pre&gt;

* Great, let&amp;#8217;s go look at our database table&amp;#8230;
&lt;pre&gt;&lt;code&gt;
  $ psql argon_development
  Welcome to psql 8.1.3, the PostgreSQL interactive terminal.

  Type:  \copyright for distribution terms
         \h for help with SQL commands
         \? for help with psql commands
         \g or terminate with semicolon to execute query
         \q to quit

  argon_development=# SELECT * FROM argonistas;
   id | name  |          blog_url           
  ----+-------+-----------------------------
    1 | Robby | http://www.robbyonrails.com
  (1 row)
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;There we go, we&amp;#8217;ve setup Ruby, Rails, and PostgreSQL on a brand new Intel MacBook without breaking a sweat!&lt;/p&gt;


	&lt;h3&gt;Extra Goodies&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;Subversion: &lt;code&gt;sudo port install subversion&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Lighttpd: &lt;code&gt;sudo port install lighttpd&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;ImageMagick: &lt;code&gt;sudo port install ImageMagick&lt;/code&gt; (known to take a while&amp;#8230;)&lt;/li&gt;
		&lt;li&gt;GraphicsMagick: &lt;code&gt;sudo port install GraphicsMagick&lt;/code&gt;&lt;/li&gt;
		&lt;li&gt;Install the rmagick gem: &lt;code&gt;sudo gem install rmagick&lt;/code&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Have fun!&lt;/p&gt;</description>
      <pubDate>Mon, 29 May 2006 09:46:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6faf4e72-89d7-433c-8e6a-059509001562</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/05/29/install-ruby-rails-and-postgresql-on-osx</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>PostgreSQL</category>
      <category>PLANET ARGON</category>
      <category>osx</category>
      <category>tutorial</category>
      <category>postgresql</category>
      <category>rubyonrails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>The PLANET ARGON dot ORG project and asset compiling gone wild</title>
      <description>&lt;p&gt;&lt;a href="http://www.infoq.com/"&gt;InfoQ&lt;/a&gt; recently &lt;em&gt;unlaunched&lt;/em&gt; their new site that is dedicated to &lt;em&gt;&amp;#8220;tracking change and innovation in the enterprise software development community.&amp;#8221;&lt;/em&gt; One of the first articles published on the site was written by &lt;a href="http://www.jvoorhis.com"&gt;Jeremy Voorhis&lt;/a&gt;, Lead Architect at &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt;. Jeremys&amp;#8217; article, &lt;a href="http://www.infoq.com/articles/Agile-Asset-Management"&gt;Agile Asset Management with Ruby DSLs&lt;/a&gt; outlines an approach we took on a client project earlier this year for managing tons of assets for a Rails application. Our development team extracted this work and built &lt;code&gt;asset_compiler&lt;/code&gt;, which is now available as a gem on RubyForge and we&amp;#8217;ve recently setup a trac so you can post bugs, patches, and all things similar. We&amp;#8217;ll be announcing a few more open source plugins, gems, and projects in the near future as well. I know that many of you are wondering when and where &lt;code&gt;acts_as_legacy&lt;/code&gt; will show up&amp;#8230; keep your eye on the trac. ;-)&lt;/p&gt;


	&lt;p&gt;To install asset_compiler, run:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;gem install asset_compiler&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Read the &lt;a href="http://asset-compiler.rubyforge.org/"&gt;asset compiler documentation&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;The &lt;a href="http://www.planetargon.org/"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt; dot org project&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
      <pubDate>Fri, 26 May 2006 09:17:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:2dd869ad-078b-48cf-9099-f0ae6e38ed33</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/05/26/the-planet-argon-dot-org-project-and-asset-compiling-gone-wild</link>
      <category>planetargon</category>
      <category>jvoorhis</category>
      <category>infoq</category>
      <category>ruby</category>
      <category>rake</category>
      <category>gems</category>
    </item>
    <item>
      <title>RubyURL... 5000+ urls in its first year</title>
      <description>&lt;p&gt;It seems that I missed the big &lt;strong&gt;5000&lt;/strong&gt; for &lt;a href="http://rubyurl.com"&gt;RubyURL&lt;/a&gt;. I just noticed that the front page is showing, &lt;em&gt;&amp;#8220;5171 happy rubyurls to date.&amp;#8221;&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;Oh the &lt;a href="http://www.robbyonrails.com/articles/2005/03/14/rubyurl-com-in-a-hour"&gt;memories&lt;/a&gt;...&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://rubyurl.com"&gt;http://rubyurl.com&lt;/a&gt;&lt;/p&gt;
</description>
      <pubDate>Tue, 11 Apr 2006 10:17:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:afdef160-d219-400f-a976-978fd33c7eb0</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/04/11/rubyurl-5000-urls-in-its-first-year</link>
      <category>rubyurl</category>
      <category>ruby</category>
    </item>
    <item>
      <title>The Argon Express!</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;WOW&lt;/span&gt;! The Rails community is awesome. Last week, I finally got a chance to get a web site up for &lt;a href="http://www.theargonexpress.com"&gt;The Argon Express&lt;/a&gt; and the response has been phenomenal. We have people from Canada, California, North Dakota, Washington, and Idaho&amp;#8230; all interested in joining us in Portland, Oregon&amp;#8230; or hoping the train somewhere in between here and Chicago.&lt;/p&gt;


	&lt;p&gt;There are currently about &lt;strong&gt;25 people&lt;/strong&gt; involved in the project!&lt;/p&gt;


	&lt;p&gt;A few logistical problems have come up&amp;#8230; that we&amp;#8217;re working on.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Seems Amtrak doesn&amp;#8217;t have as many outlets as we&amp;#8217;d like&amp;#8230; so we might have to get Rooms so we can have charging stations for our laptop batteries! heh&lt;/li&gt;
		&lt;li&gt;How many geeks can fit on a train&amp;#8230; and will they kick us off?&lt;/li&gt;
		&lt;li&gt;Does Wifi work through train cars very well? (likely going to setup our own private wifi lan)&lt;/li&gt;
		&lt;li&gt;Who is bringing the shuttle server for hosting a &lt;span class="caps"&gt;SVN&lt;/span&gt; repository and webserver for playing with?&lt;/li&gt;
		&lt;li&gt;Will RailsConf give us a special discount as a group. &lt;span class="caps"&gt;ANSWER&lt;/span&gt;: &lt;strong&gt;&lt;span class="caps"&gt;YES&lt;/span&gt;&lt;/strong&gt; We got a discount! ;-)&lt;/li&gt;
		&lt;li&gt;Will we trip the circuits on Amtrak if we run power stips and extension cords? heh&lt;/li&gt;
		&lt;li&gt;Can we find sponsors to help cover the costs for these recharging station rooms? (gets expensive for private rooms)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;... if you&amp;#8217;re interested in giving us some good ideas&amp;#8230; and even if you can&amp;#8217;t join us on the trip&amp;#8230;but want to help promote it and plan it, please contact me via the email link on &lt;a href="http://theargonexpress.com"&gt;theargonexpress.com&lt;/a&gt; to join the basecamp project. :-)&lt;/p&gt;


&lt;strong&gt;&lt;span class="caps"&gt;UPDATES&lt;/span&gt;&lt;/strong&gt;
	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://weblog.rubyonrails.com/articles/2006/02/06/the-argon-express-to-railsconf"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt; blogged about us on the Rails weblog&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.railsconf.com/articles/2006/02/08/start-railsconf-2000-miles-early"&gt;Chad Fowler mentioned us on the RailsConf blog&lt;/a&gt;!&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;The PA team is signed up for RailsConf!&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;:-D&lt;/p&gt;
</description>
      <pubDate>Tue, 07 Feb 2006 19:34:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:27dcb8ce-4cb9-470e-b147-71f65e342373</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/02/07/the-argon-express</link>
      <category>argonexpress</category>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Programming Rails - Alpha Book</title>
      <description>&lt;p&gt;Up until today, I have had a small group of individuals (people like &lt;a href="http://nimblecode.com"&gt;harrisj&lt;/a&gt;) helping me with the peer review process for my upcoming book, &lt;a href="http://www.programmingrails.com"&gt;Programming Rails&lt;/a&gt;. We&amp;#8217;re getting it ready to launch as a &lt;a href="http://www.oreilly.com/roughcuts/"&gt;Rough Cuts&lt;/a&gt; book in the near future and I wanted to allow a few of you to be part of the pre-Rough Cuts review process.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m opening this up to &lt;strong&gt;6 lucky winners&lt;/strong&gt;!&lt;/p&gt;


	&lt;p&gt;Send me an email to &lt;a href="mailto:robby@planetargon.com?subject=programming_rails_book_alpha_reviewer"&gt;robby@planetargon.com&lt;/a&gt; with a short description of your experience with Rails so far. I want 2 newbies, 2 intermediates, and 2 advanced Railers.&lt;/p&gt;


	&lt;p&gt;Only do this if you can spend time reading material and posting notes on each chapter. :-)&lt;/p&gt;


	&lt;p&gt;Visit &lt;a href="http://www.programmingrails.com"&gt;www.programmingrails.com&lt;/a&gt; for more information about my book and apparently&amp;#8230; you can &lt;a href="http://rubyurl.com/Ye5"&gt;add it to your Amazon Wishlist&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt; No longer accepting applications! I got 50+ in 2 hours&amp;#8230; eek! :-)&lt;/p&gt;
</description>
      <pubDate>Fri, 03 Feb 2006 12:34:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:955764db-2bfa-43b3-a448-86f965a70f00</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/02/03/programming-rails-alpha-book</link>
      <category>rails</category>
      <category>ruby</category>
      <category>book</category>
    </item>
    <item>
      <title>rbot as a server monitor</title>
      <description>&lt;p&gt;Most of you who know the &lt;a href="http://www.planetargon.com/"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; team&amp;#8230; know that we spend quite a bit of time on &lt;span class="caps"&gt;IRC&lt;/span&gt; interacting with our customes, clients, coworkers, and friends. Quite a bit of our coordination of projects, development, and support is handled via &lt;span class="caps"&gt;IRC&lt;/span&gt;.&lt;/p&gt;


	&lt;p&gt;For example, all our &lt;span class="caps"&gt;SVN&lt;/span&gt; commits are processed in a private &lt;span class="caps"&gt;IRC&lt;/span&gt; channel where all &lt;a href="http://www.planetargon.com/"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; developers and our contractors meet and mingle. Hosting customers hang out in &lt;code&gt;#planetargon&lt;/code&gt; on &lt;strong&gt;irc.freenode.net&lt;/strong&gt; and play with our &lt;span class="caps"&gt;IRC&lt;/span&gt; Bot &lt;strong&gt;argonbot&lt;/strong&gt;.&lt;/p&gt;


	&lt;p&gt;This morning&amp;#8230; I decided that I wanted to  follow the teams advice and start making argonbot even more useful. So, I setup instances of DRb running on every server that we host clients and customers on&amp;#8230; and now we can using argonbot to help manage our servers and allow our customers to help us monitor them!&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="number"&gt;08&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;&lt;span class="number"&gt;51&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;robbyonrails&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt; &lt;span class="char"&gt;?a&lt;/span&gt;&lt;span class="ident"&gt;rgon&lt;/span&gt;&lt;span class="punct"&gt;-&lt;/span&gt;&lt;span class="ident"&gt;moon&lt;/span&gt; &lt;span class="ident"&gt;xenon&lt;/span&gt; &lt;span class="ident"&gt;uptime&lt;/span&gt;
&lt;span class="number"&gt;08&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;&lt;span class="number"&gt;51&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="ident"&gt;argonbot&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt; &lt;span class="ident"&gt;xenon&lt;/span&gt; &lt;span class="ident"&gt;uptime&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;  &lt;span class="number"&gt;10&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;&lt;span class="number"&gt;51&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;&lt;span class="number"&gt;38&lt;/span&gt; &lt;span class="ident"&gt;up&lt;/span&gt; &lt;span class="number"&gt;79&lt;/span&gt; &lt;span class="ident"&gt;days&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;20&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt;&lt;span class="number"&gt;34&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;  &lt;span class="number"&gt;5&lt;/span&gt; &lt;span class="ident"&gt;users&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt;  &lt;span class="ident"&gt;load&lt;/span&gt; &lt;span class="ident"&gt;average&lt;/span&gt;&lt;span class="punct"&gt;:&lt;/span&gt; &lt;span class="number"&gt;1.03&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;1.05&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="number"&gt;1.00&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Stop by and meet the world famous argonbot! You can even use our &lt;a href="http://www.planetargon.com/chat.html"&gt;web-based &lt;span class="caps"&gt;IRC&lt;/span&gt; client&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;I love DRb.&lt;/strong&gt;&lt;/p&gt;
</description>
      <pubDate>Fri, 03 Feb 2006 11:01:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:2276f24c-d522-4c86-b8d5-ec86c4bf4006</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/02/03/rbot-as-a-server-monitor</link>
      <category>rbot</category>
      <category>ruby</category>
      <category>planetargon</category>
    </item>
    <item>
      <title>Ruby eye for the anti-newbie guy</title>
      <description>&lt;p&gt;I was skimming over a few &lt;span class="caps"&gt;RSS&lt;/span&gt; feeds ( &lt;a href="http://blogs.thoughtworks.com/"&gt;blogs.thoughtworks.com&lt;/a&gt; ) this morning and came across an entry by
&lt;a href="http://blog.griffincaprio.com/blog/PermaLink.aspx?guid=a9eb87a7-70e0-41ad-8f6b-4dc11c70c53f"&gt;Griffin Caprio&lt;/a&gt;. He shared his thought on the new book by Chris Pine, &lt;a href="http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html"&gt;Learn to Program&lt;/a&gt; and says the following:&lt;/p&gt;


	&lt;p&gt;&lt;i&gt;&amp;#8221;...You wouldn&amp;#8217;t see these types of books in other professions like medical, engineering, or accounting because there are boards that prevent just any old person from practicing in those fields.&lt;/p&gt;


	&lt;p&gt;Not so in computing. But is this what we want to encourage?  Anyone and everyone picking up software and just giving it a go?&lt;/p&gt;


	&lt;p&gt;And I understand everyone&amp;#8217;s love of Ruby, but come on people. It&amp;#8217;s just a language.&amp;#8221;&lt;/i&gt;&lt;/p&gt;


	&lt;p&gt;Actually, yes. Learning to program, build, create, test, problem solve, etc&amp;#8230; are all things that &lt;em&gt;we &lt;strong&gt;should&lt;/strong&gt; encourage&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s do a quick search on amazon for the following, &lt;a href="http://www.amazon.com/exec/obidos/external-search/103-8484556-9941417?field-keywords=learn+to+program"&gt;Learn to Program&lt;/a&gt;. I&amp;#8217;m pretty sure these books have been common place for the past 20+ years&amp;#8230; so, what&amp;#8217;s the big deal?&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s like telling a kid not to build a bird house until he gets a contractors license and a permit.&lt;/p&gt;


	&lt;p&gt;...or telling someone to not pick up a guitar until they had proper lessons.&lt;/p&gt;


	&lt;p&gt;...or maybe you shouldn&amp;#8217;t be running a business without graduating from college.&lt;/p&gt;


	&lt;p&gt;I could go on and on.&lt;/p&gt;


	&lt;p&gt;Oh&amp;#8230; and by the way&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;puts&lt;/span&gt; &lt;span class="punct"&gt;&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Hello World&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;is &lt;strong&gt;much sexier&lt;/strong&gt; than&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;public&lt;/span&gt; &lt;span class="ident"&gt;static&lt;/span&gt; &lt;span class="ident"&gt;void&lt;/span&gt; &lt;span class="ident"&gt;main&lt;/span&gt;&lt;span class="punct"&gt;(&lt;/span&gt;&lt;span class="constant"&gt;String&lt;/span&gt;&lt;span class="punct"&gt;[]&lt;/span&gt; &lt;span class="ident"&gt;args&lt;/span&gt;&lt;span class="punct"&gt;)&lt;/span&gt; &lt;span class="punct"&gt;{&lt;/span&gt;
  &lt;span class="constant"&gt;System&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;out&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;println&lt;/span&gt; &lt;span class="punct"&gt;(&amp;quot;&lt;/span&gt;&lt;span class="string"&gt;Hello World&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;On that note&amp;#8230; check out &lt;a href="http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html"&gt;Learn to Program&lt;/a&gt; by Chris Pine.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt;
Griffin has followed up to my blog entry with &lt;a href="http://blog.griffincaprio.com/blog/PermaLink.aspx?guid=bab9eada-919f-4f48-9bec-5ca058d23e58"&gt;another&lt;/a&gt;. He goes on to say, &lt;em&gt;&amp;#8220;The kid who builds the bird house above would never be hired to build an actual house.  Not true in Software Development.&amp;#8221;&lt;/em&gt; (&lt;a href="http://blog.griffincaprio.com/blog/PermaLink.aspx?guid=bab9eada-919f-4f48-9bec-5ca058d23e58"&gt;read more&lt;/a&gt;)&lt;/p&gt;


	&lt;p&gt;I think this problem raises a completely different problem. Why are unqualified people being hired to do things that they aren&amp;#8217;t qualified for? Do we blame the people learning to program or do we look at who hires these people in the first place? I&amp;#8217;m still confused by his argument.&lt;/p&gt;


	&lt;p&gt;That kid may not get hired to build a house, but he may get interested in that as a career and continue to pursue it&amp;#8230; if someone hires him to build the whole house, then the person hiring should be held accountable do some degree as well. Check references! ;-)&lt;/p&gt;


	&lt;p&gt;On the flip-side&amp;#8230; is this an argument to only take people who have been approved by some board (...MCSE?) seriously when hiring developers?&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update #2&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Griffin has outlined his points in more detail in &lt;a href="http://blog.griffincaprio.com/blog/PermaLink.aspx?guid=22784b17-01b1-47bc-95a3-ac052495a9cc"&gt;this third entry&lt;/a&gt;.&lt;/p&gt;
</description>
      <pubDate>Wed, 18 Jan 2006 09:44:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:1d5e924c271c7210c51cc06fa4e94ba3</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/01/18/ruby-eye-for-the-anti-newbie-guy</link>
      <category>Ruby</category>
      <category>Programming</category>
      <category>ruby</category>
      <category>book</category>
      <category>programming</category>
      <category>rant</category>
    </item>
    <item>
      <title>Rails development in 2006...</title>
      <description>&lt;p&gt;It&amp;#8217;s been almost a year since &lt;a href="http://blog.curthibbs.us"&gt;Curt Hibbs&lt;/a&gt; article, &lt;a href="http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html"&gt;Rolling with Ruby on Rails&lt;/a&gt; was published on ONLamp. Since then we&amp;#8217;ve witnessed this huge &lt;a href="http://gmane.org/plot-rate.php?group=gmane.comp.lang.ruby.rails"&gt;community of talented individuals emerge&lt;/a&gt; . Wow. What a year.&lt;/p&gt;


	&lt;h3&gt;Your Thoughts?&lt;/h3&gt;


	&lt;p&gt;Will 2006 be an even bigger year for the Rails project? Will we see more development firms emerge with highly talented Rails developers? What is everybody doing currently and what are they planning on doing? Conferences&amp;#8230; books&amp;#8230; fun&amp;#8230; fun&amp;#8230; fun.&lt;/p&gt;


	&lt;h3&gt;Viva la Argonistas!&lt;/h3&gt;


	&lt;p&gt;At &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt;, we&amp;#8217;re in the middle of a complete reorganization of how we can be of &lt;strong&gt;better service to you&lt;/strong&gt;. As of the start of this year&amp;#8230; we are bigger, better, and you&amp;#8217;ll likely notice some new faces. Who? We&amp;#8217;re not telling (quite) yet. ;-)&lt;/p&gt;


	&lt;p&gt;What I can promise:&lt;/p&gt;


&lt;center&gt;
&lt;strong&gt;&lt;span class="caps"&gt;RAILS DEVELOPERS&lt;/span&gt;. RAILS &lt;span class="caps"&gt;DEVELOPERS&lt;/span&gt;.&lt;/strong&gt;

	&lt;p&gt;&lt;a href="http://www.flickr.com/photos/planetargon/81344951/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/38/81344951_1273f824ca_m.jpg" width="240" height="90" alt="PLANET ARGON: January 2006" /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;strong&gt;&lt;span class="caps"&gt;RAILS DEVELOPERS&lt;/span&gt;. RAILS &lt;span class="caps"&gt;DEVELOPERS&lt;/span&gt;.&lt;/strong&gt;
&lt;/center&gt;

	&lt;p&gt;I wish you all the best in 2006!&lt;/p&gt;


	&lt;p&gt;Continue to stay tuned&amp;#8230;&lt;/p&gt;
</description>
      <pubDate>Mon, 02 Jan 2006 21:53:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:4880e76c3c0027c21b6ef456b7e9e841</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2006/01/02/rails-development-in-2006</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>planetargon</category>
      <category>rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>Go Ruby Go!</title>
      <description>&lt;p&gt;&lt;a href="http://www.loudthinking.com/arc/000547.html"&gt;&lt;span class="caps"&gt;DHH&lt;/span&gt; wrote&lt;/a&gt; that &lt;a href="http://radar.oreilly.com/archives/2005/12/ruby_book_sales_surpass_python.html"&gt;Tim O&amp;#8217;Reilly wrote&lt;/a&gt; on O&amp;#8217;Reilly Radar, &lt;a href="http://radar.oreilly.com/archives/2005/12/ruby_book_sales_surpass_python.html"&gt;Ruby Book Sales Surpass Python.&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;While I was looking at the data, though, I noticed something perhaps more newsworthy: in the same period, Ruby book sales surpassed Python book sales for the first time. Python is up 20% vs. the same period last year, but Ruby is up 1552%! (Perl is down 3%.)&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;...awesome!&lt;/p&gt;
</description>
      <pubDate>Wed, 07 Dec 2005 19:52:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:6062c54a306d84fcd70e04c9e49c0814</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/12/07/go-ruby-go</link>
      <category>My Book</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>ruby</category>
      <category>programming</category>
      <category>books</category>
    </item>
    <item>
      <title>Try Ruby</title>
      <description>&lt;p&gt;I was lucky enough to see this when it was in the alpha-beta-try-that-again stage.&lt;/p&gt;


	&lt;h2&gt;&lt;a href="http://tryruby.hobix.com"&gt;Try Ruby&lt;/a&gt;&lt;/h2&gt;


	&lt;p&gt;That&amp;#8217;s right&amp;#8230; &lt;a href="http://redhanded.hobix.com/"&gt;_why&lt;/a&gt; has done it again. You might know him as that d00d who made &lt;a href="http://hoodwink.d"&gt;hoodwink.d&lt;/a&gt; or that weird0 who made that &lt;a href="http://poignantguide.net/ruby"&gt;poignant guide&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Have friends who are skeptical of Ruby??? tell them to&amp;#8230; &lt;a href="http://tryruby.hobix.com"&gt;Try Ruby&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Have your parents had a chance to &lt;a href="http://tryruby.hobix.com"&gt;try ruby&lt;/a&gt;?&lt;/p&gt;


	&lt;p&gt;Maybe that weird uncle of yours needs to &lt;a href="http://tryruby.hobix.com"&gt;try ruby&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;That guy who sneezed on you on the bus ride&amp;#8230; tell him to &lt;a href="http://tryruby.hobix.com"&gt;try ruby&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m might get some stickers printed and litter Portland with &lt;a href="http://tryruby.hobix.com"&gt;Try Ruby&lt;/a&gt; stickers&amp;#8230;&lt;/p&gt;


	&lt;p&gt;...the revolution begins&amp;#8230; (again)&lt;/p&gt;
</description>
      <pubDate>Tue, 29 Nov 2005 09:18:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:228d7dba5161d1aca505f7880e459576</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/11/29/try-ruby</link>
      <category>Ruby</category>
      <category>Programming</category>
      <category>_why</category>
      <category>ruby</category>
    </item>
    <item>
      <title>PLANET ARGON Core Team Grows +1</title>
      <description>&lt;p&gt;A week ago today, we launched the new &lt;a href="http://www.planetargon.com"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;&lt;/a&gt; web site. That went great! Then, late last week, &lt;a href="http://jvoorhis.com"&gt;Jeremy Voorhis&lt;/a&gt; and I &lt;a href="http://weblog.rubyonrails.org/archives/2005/10/27/refactoring-rails-is-coming-soon"&gt;announced&lt;/a&gt; that we were working on a top-secret project, &lt;a href="http://www.refactoringrails.com"&gt;Refactoring Rails&lt;/a&gt;. Thought that was it? Guess again.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;OHIO TO OREGON&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;We are exicted to announce that this Saturday, &lt;a href="http://jvoorhis.com"&gt;Jeremy Voorhis&lt;/a&gt; will be catching a flight from Pittsburg to Portland to come and join the &lt;a href="http://www.planetargon.com/about.html"&gt;&lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt; Core Team&lt;/a&gt;. We&amp;#8217;ve been working with this highly talented individual on several recent &lt;a href="http://www.planetargon.com/development.html"&gt;development projects&lt;/a&gt; and it only seemed natural that he play a more active role in &lt;span class="caps"&gt;PLANET ARGON&lt;/span&gt;. So we asked him to pick up, move to &lt;a href="http://www.travelportland.com/"&gt;Portland&lt;/a&gt; and join the team here. Well, Jeremy took us up on the offer and is preparing for the big move as I type this.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;PDX&lt;/span&gt;.rb += 1&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.pdxruby.org"&gt;Portland Ruby Brigade&lt;/a&gt;, expect to see a new face at the December meeting!&lt;/p&gt;


	&lt;p&gt;And if you think this is the last of our accouncements&amp;#8230; well, stay tuned&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;&lt;/strong&gt;: Yes, this means that Jeremy will join us out West to work with &lt;a href="http://www.rubyonrails.org"&gt;Ruby on Rails&lt;/a&gt; all-the-time!&lt;/p&gt;
</description>
      <pubDate>Tue, 01 Nov 2005 15:30:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:749738105cd1a2f5834fbc1cecac069d</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/11/01/planet-argon-core-team-grows-plus-one</link>
      <category>Business</category>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>planetargon</category>
      <category>rails</category>
      <category>ruby</category>
      <category>jvoorhis</category>
    </item>
    <item>
      <title>Refactoring Rails... coming soon</title>
      <description>&lt;p&gt;As you may have heard earlier, &lt;a href="http://www.jvoorhis.com/"&gt;Jeremy Voorhis&lt;/a&gt; and I are working on a &lt;a href="http://www.jvoorhis.com/articles/2005/10/27/introducing-refactoring-rails"&gt;top-secret project&lt;/a&gt; together. We&amp;#8217;re going to keep things quiet for just a bit longer while we get an initial site together. In the meantime, sign up on our mailing list to be notified when we launch it.&lt;/p&gt;


	&lt;p&gt;We present to you&amp;#8230;. &lt;a href="http://www.refactoringrails.com"&gt;Refactoring Rails&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.refactoringrails.com"&gt;&lt;img src="http://www.refactoringrails.com/refactoringrailssmall.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.jvoorhis.com/"&gt;Jeremy&lt;/a&gt; posted a short teaser on his blog and we&amp;#8217;ll just keep you in suspense&amp;#8230; but keep an eye out in the coming week(s). :-)&lt;/p&gt;


	&lt;p&gt;For more information, bookmark: &lt;a href="http://www.refactoringrails.com"&gt;http://www.refactoringrails.com&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&amp;#8220;Remove ambiguities and convert to specifics&amp;#8221;&lt;/em&gt; &amp;#8211; &lt;strong&gt;Brian Eno&lt;/strong&gt;, Oblique Strategies&lt;/p&gt;
</description>
      <pubDate>Thu, 27 Oct 2005 14:30:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:35ca2fcb44f472a9b46f97d81fe65596</guid>
      <author>Robby Russell</author>
      <link>http://www.robbyonrails.com/articles/2005/10/27/refactoring-rails-coming-soon</link>
      <category>Ruby on Rails</category>
      <category>Ruby</category>
      <category>Programming</category>
      <category>refactoring</category>
      <category>rails</category>
      <category>ruby</category>
      <category>programming</category>
    </item>
    <item>
      <title>Using Named Placeholders in Ruby</title>
      <description>&lt;p&gt;&lt;strong&gt;Insert Hip Quote Here:&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&amp;#8220;In ancient times, hundreds of years before the dawn of history, an ancient race of people&amp;#8230; the Druids. No one knows who they were or what they were doing&amp;#8230; &amp;#8220;&lt;/em&gt; &amp;#8211; Nigel Tufnel, Spinal Tap&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Story Time&amp;#8230;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Earlier, I was giving a customer of ours, Jared from &lt;a href="http://www.communitywalk.com"&gt;CommunityWalk.com&lt;/a&gt; a quick tutorial on some of the features script/console&amp;#8230; which lead to helping him with a &lt;span class="caps"&gt;SQL&lt;/span&gt; query. When I provided him with some working code he was curious about what I had done in the &lt;span class="caps"&gt;SQL&lt;/span&gt; query string that I was passing to &lt;code&gt;find_by_sql&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;WARNING&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;If you have &lt;span class="caps"&gt;ANY SQL&lt;/span&gt; queries that resembles the following, &lt;span class="caps"&gt;PLEASE READ THE REST OF THIS&lt;/span&gt;. :-)&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;values&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;:search&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt;
&lt;span class="constant"&gt;RockLegend&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="symbol"&gt;:conditions&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;first_name = '&lt;span class="expr"&gt;#{values['first_name']}&lt;/span&gt;'&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;If you are doing that&amp;#8230; then you are opening yourself up to some security problems. Let&amp;#8217;s take a few minutes and discuss how you can make this more secure and still keep your code readable. (the best of both worlds!)&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;The ? Placeholder&lt;/strong&gt;&lt;/p&gt;


Many of you are probably familiar with this approach&amp;#8230;
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="constant"&gt;RockLegend&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="symbol"&gt;:conditions&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;first_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;Nigel&lt;/span&gt;&lt;span class="punct"&gt;']&lt;/span&gt; &lt;span class="punct"&gt;)&lt;/span&gt;

&lt;span class="constant"&gt;RockLegend&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="symbol"&gt;:conditions&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;first_name = ? AND last_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;Nigel&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Tufnel&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;You can pass it a hash as well.. and as long as you put everything in the same order as the &lt;code&gt;?&lt;/code&gt;s are placed&amp;#8230; then all is well.&lt;/p&gt;


	&lt;p&gt;My only real problem with this approach is that it requires you to keep things in a specific sequential order&amp;#8230; and who wants to keep track of that? So, I would like to recommend that you use named placeholders. Aside from that, it looks magical and I don&amp;#8217;t like magical-looking code. I like &lt;em&gt;easy to read code&lt;/em&gt;. :-)&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Named Placeholders&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;If you already use these&amp;#8230; you know how  useful they can be in your &lt;span class="caps"&gt;SQL&lt;/span&gt; queries. If you haven&amp;#8217;t seen them before&amp;#8230; it&amp;#8217;s because the Rails docs don&amp;#8217;t really mention it and is something that comes from the underlying database library in Ruby. So what is so great about these?&lt;/p&gt;


Let&amp;#8217;s first replace the above code with named parameters&amp;#8230;
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="constant"&gt;RockLegend&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="symbol"&gt;:conditions&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;first_name = :first_name&lt;/span&gt;&lt;span class="punct"&gt;',&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="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Nigel&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="punct"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;We are passing a hash with a matching key to the conditions option. Pretty neat, right? In this case with just one placeholder we just increased the amount of code to do the same thing. So, it might always be the best solution&amp;#8230; but it is &lt;em&gt;easier to read&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;Let&amp;#8217;s try another with multiple keys in our hash&amp;#8230; infact, we&amp;#8217;ll build the hash prior to calling &lt;code&gt;find&lt;/code&gt;.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;values&lt;/span&gt; &lt;span class="punct"&gt;=&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="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Nigel&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="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Tufnel&lt;/span&gt;&lt;span class="punct"&gt;'}&lt;/span&gt;
&lt;span class="constant"&gt;RockLegend&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="symbol"&gt;:conditions&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;first_name = :first_name AND last_name = :last_name&lt;/span&gt;&lt;span class="punct"&gt;',&lt;/span&gt; &lt;span class="ident"&gt;values&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;It will happily match the hash keys to the named placeholders in the conditions string. Again, nothing terribly exciting&amp;#8230;but it is &lt;em&gt;easier to read&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Who cares about order? Not named placeholders!&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;Okay, let&amp;#8217;s mix things up a bit&amp;#8230;&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;values&lt;/span&gt; &lt;span class="punct"&gt;=&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="punct"&gt