<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Transcending Frontiers &#187; Setting Up an iMac Pairing Station for Rails Development</title>
	<atom:link href="http://blog.thefrontiergroup.com.au/tag/imac/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thefrontiergroup.com.au</link>
	<description>Your peek inside the collective mind of The Frontier Group</description>
	<lastBuildDate>Tue, 03 Jan 2012 06:53:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Setting Up an iMac Pairing Station for Rails Development</title>
		<link>http://blog.thefrontiergroup.com.au/2010/04/setting-up-an-imac-pairing-station-for-rails-development/</link>
		<comments>http://blog.thefrontiergroup.com.au/2010/04/setting-up-an-imac-pairing-station-for-rails-development/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 09:08:33 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Inside TFG]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iMac]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://thefrontiergroup.com.au/blog/?p=599</guid>
		<description><![CDATA[I used this post today as a guide on how to get another iMac up and running so I thought it was probably a good point to chuck this up here, if only for our own reference. We are starting with a 27&#8243; iMac and a base Snow Leopard install. The first step was to [...]]]></description>
			<content:encoded><![CDATA[<p>I used this post today as a guide on how to get another iMac up and running so I thought it was probably a good point to chuck this up here, if only for our own reference. </p>
<p>We are starting with a 27&#8243; iMac and a base Snow Leopard install. </p>
<p>The first step was to install Xcode from the Snow Leopard disc, you&#8217;ll find it in the Optional Installs part of the disc. </p>
<p>Ruby and RubyGems comes with Snow Leopard by default so we&#8217;ll use them. You&#8217;ll likely need to update the RubyGems system :</p>
<pre class="console">
    sudo gem update --system
</pre>
<p>Now we can install Rails :</p>
<pre>
  sudo gem install rails
</pre>
<p>This will install the latest stable version of Rails. We need a specific version for some of our applications (until we&#8217;ve tested it under the newer version) and you can do this by adding the -v switch : </p>
<pre>
  sudo gem install rails -v=2.3.4
</pre>
<p>After this we can switch on Apache and install passenger, the module that runs Rails on Apache. So turn on Web Sharing in the Sharing panel of your System Preferences. </p>
<pre>
  sudo gem install passenger
  sudo passenger-install-apache2-module
</pre>
<p>This will compile the Apache module and give you some text to paste into your apache conf file to load it. I keep this in a separate config file in /etc/apache2/other/passenger.conf. It should look something like : </p>
<pre>
  LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.2.8/ext/apache2/mod_passenger.so
  PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.2.8
  PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
</pre>
<p>Next download the Passenger Preference Pane so you can control your Rails sites from the OS X Preferences area. You can get it from <a href="http://www.fngtps.com/passenger-preference-pane">http://www.fngtps.com/passenger-preference-pane</a>. You should now be able to run Rails websites on your local machine very easily.</p>
<p>We use Git for our source control and Git X is the best GUI for this on OS X at the moment. You can download Git for OS X from <a href="http://code.google.com/p/git-osx-installer/">http://code.google.com/p/git-osx-installer/</a> and you can get GitX from <a href="http://gitx.frim.nl/">http://gitx.frim.nl/</a>.</p>
<p>I like to use a Pomodoro timer when pairing and the one I like the best for OS X is just called Pomodoro Desktop. It will keep people focussed and also can serve to keep the control swapping in a fairly regular way. You can find out about how Pomodoro works <a href="http://www.pomodorotechnique.com/">here</a>.</p>
<p>We use Github for our repository and exchange is done via SSH, so you&#8217;ll need to generate an SSH key and put that into your Github account. </p>
<pre>
  ssh-keygen
  cat ~/.ssh/id_rsa.pub
</pre>
<p>Copy the output and put that into your public SSH keys in Git Hub. </p>
<p>When pairing with Git the ability to have both parties responsible for the work they&#8217;re doing is appreciated sometimes. Especially twelve months from now when you can&#8217;t remember why you did something. Not that you don&#8217;t comment your code, or always write beautifully understandable code. There is a nice gem called <a href="http://github.com/therubymug/hitch">hitch</a>. It comes out of Hashrocket and handles the &#8216;hitching&#8217; and &#8216;unhitching&#8217; of partners on a machine. We have a pairing station so generally we just want to change the pair that&#8217;s in operation, so it works well. You&#8217;ll need to be inside a git repository to do the initial setup. I cloned one of our projects and then you issue : </p>
<pre>
  hitch -m
</pre>
<p>Which will prompt you for your main email address, this is the email address that all devs in your team receive, or a group email of some sort. </p>
<p>Now to hitch two devs you&#8217;d do : </p>
<pre>
  hitch dev1 dev2
</pre>
<p>This will prompt you for names of the dev1 and dev2 users so that they&#8217;ll be displayed in your commit. It&#8217;ll also associate your commits to the email address devs+dev1+dev2@company.com if you setup devs@company.com as the email address when you issued the hitch -m command. If you setup gravatars for all your devs+user1+user2@company.com email addresses then you&#8217;ll get a nice picture in Github too. </p>
<p>I think that&#8217;s about it really. We obviously just install gems as required and make customisations on a per developer need. We generally use Textmate for editing so this means installing a theme (we use the Railscast theme) and the relevant bundles for Rspec, Haml and Sass. </p>
<script src="http://feeds.feedburner.com/~s/TranscendingFrontiers?i=http://blog.thefrontiergroup.com.au/2010/04/setting-up-an-imac-pairing-station-for-rails-development/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://blog.thefrontiergroup.com.au/2010/04/setting-up-an-imac-pairing-station-for-rails-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

