<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.3" -->
<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/"
	>

<channel>
	<title>Chuddup and Read This</title>
	<link>http://chuddup.com/blog</link>
	<description>Oh God, not another tagline</description>
	<pubDate>Sat, 19 Apr 2008 22:09:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.3</generator>
	<language>en</language>
			<item>
		<title>Another Rails Plugin: LabeledFormWithErrors</title>
		<link>http://chuddup.com/blog/archive/35/another-rails-plugin-labeledformwitherrors/</link>
		<comments>http://chuddup.com/blog/archive/35/another-rails-plugin-labeledformwitherrors/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 18:44:08 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/35/another-rails-plugin-labeledformwitherrors/</guid>
		<description><![CDATA[<p>Today I released my second plugin for Rails.</p>

<p>It&#8217;s pretty simple. It&#8217;s a set of 4 helper methods, based on the form builder that comes with Rails 2.0+ that provides you a sane way to present the error messages from your Model validations on form labels. That&#8217;s enough tell, on with the show!</p>

<h1>app/models/person.rb</h1>

<p>class Person &#60; [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>Today I released my second plugin for Rails.</p>

<p>It&#8217;s pretty simple. It&#8217;s a set of 4 helper methods, based on the form builder that comes with Rails 2.0+ that provides you a sane way to present the error messages from your Model validations on form labels. That&#8217;s enough tell, on with the show!</p>

<p><code><pre># app/models/person.rb
class Person &lt; ActiveRecord::Base
  validates_presence_of     :name, :age, :gender
  validates_numericality_of :age, :message => "must be a number"
  validates_length_of       :gender, :is => 1, 
    :message => "must be exactly 1 character"
  validates_format_of       :gender, :with => /^[mf]$/,
    :message => "must be m or f"
end</pre></code></p>

<p>After submitting with all fields blank, the example scaffold form looks like this :<br />
<img src="http://img.skitch.com/20080331-gmwyh7eirh9jyy4k269ht2tq4d.jpg" alt="People: update"/></p>

<p>That&#8217;s pretty much it. As <a href="http://weblog.jamisbuck.org/2007/2/21/review-build-your-own-ruby-on-rails-web-applications">Jamis says</a>, &#8220;never use a plugin you would not be able to write yourself.&#8221;</p>

<p>You can clone the plugin repo using git from</p>

<p>git://github.com/cee-dub/labeledformwitherrors.git</p>

<p>or download the tarball <a href="http://github.com/cee-dub/labeledformwitherrors/tarball/master">here</a></p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/35/another-rails-plugin-labeledformwitherrors/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>St. Patrick&#8217;s Day fire in the Mission</title>
		<link>http://chuddup.com/blog/archive/34/st-patricks-day-fire-in-the-mission/</link>
		<comments>http://chuddup.com/blog/archive/34/st-patricks-day-fire-in-the-mission/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 22:02:52 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/34/st-patricks-day-fire-in-the-mission/</guid>
		<description><![CDATA[<p>The house behind mine is on fire and getting worse</p>

<p>Photo originally uploaded by cee-dub.</p>

<p>The fire was right behind my house. This is a photo I took with my iPhone, the only camera I had available at the time, right before leaving the house in case the fire jumped over Poplar St. to my building.</p>

<p>This photo [...]</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/ymbiont/2341396397/" title="Flickr photo"><img src="http://farm3.static.flickr.com/2109/2341396397_536363d8c5_m.jpg" alt="" style="border: solid 2px #000000;" class="alignleft" /></a></p>

<h4 style="margin-bottom:2px"><a href="http://www.flickr.com/photos/ymbiont/2341396397/">The house behind mine is on fire and getting worse</a></h4>

<p><small>Photo originally uploaded by <a href="http://www.flickr.com/people/ymbiont/">cee-dub</a>.</small>
<br clear="all" /></p>

<p>The fire was right behind my house. This is a photo I took with my iPhone, the only camera I had available at the time, right before leaving the house in case the fire jumped over Poplar St. to my building.<br />
<br />
This photo got picked up and twittered by Laughing Squid about 20 minutes after I posted it directly to flickr from my iPhone.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/34/st-patricks-day-fire-in-the-mission/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Apartment bouldering FTW</title>
		<link>http://chuddup.com/blog/archive/33/apartment-bouldering-ftw/</link>
		<comments>http://chuddup.com/blog/archive/33/apartment-bouldering-ftw/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 22:56:50 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Praise</category>
	<category>San Francisco</category>
	<category>Climbing</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/33/apartment-bouldering-ftw/</guid>
		<description><![CDATA[<p>Apartment bouldering FTW</p>

<p>Is it possible that I&#8217;m really into rock climbing when I start climbing things that aren&#8217;t even close to rocks?</p>

<p>Photo originally uploaded by linoleum jet.</p>
]]></description>
			<content:encoded><![CDATA[<h4 style="margin-bottom:2px"><a href="http://www.flickr.com/photos/juliemelton/2272918878/">Apartment bouldering FTW</a></h4>

<p><a href="http://www.flickr.com/photos/juliemelton/2272918878/" title="Flickr photo"><img src="http://farm3.static.flickr.com/2072/2272918878_69693b7a47_m.jpg" alt="" style="border: solid 2px #000000;" class="alignleft" /></a>
Is it possible that I&#8217;m really into rock climbing when I start climbing things that aren&#8217;t even close to rocks?
<br clear="all" />
<small>Photo originally uploaded by <a href="http://www.flickr.com/people/juliemelton/">linoleum jet</a>.</small></p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/33/apartment-bouldering-ftw/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Google Adds Terrain Maps and Public Transit Routing</title>
		<link>http://chuddup.com/blog/archive/32/google-adds-terrain-maps-and-public-transit-routing/</link>
		<comments>http://chuddup.com/blog/archive/32/google-adds-terrain-maps-and-public-transit-routing/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 23:12:43 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/32/google-adds-terrain-maps-and-public-transit-routing/</guid>
		<description><![CDATA[<p>I&#8217;m very impressed with Google Maps. The team there frequently adds useful features in well-executed ways.</p>

<p>Just today I noticed two new features. The first, is Terrain map tiles that feature both shaded relief of the actual terrain and road detail. This is what the Hybrid view wishes it looked like. Bravo!</p>

<p>The second new feature is [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very impressed with Google Maps. The team there frequently adds useful features in well-executed ways.</p>

<p>Just today I noticed two new features. The first, is Terrain map tiles that feature both shaded relief of the actual terrain and road detail. This is what the Hybrid view wishes it looked like. Bravo!</p>

<p>The second new feature is the option to get directions for public transit! This is great, especially for a city dweller such as myself. However, I don&#8217;t think they&#8217;ve worked out all the kinks in this one :)</p>

<p>This is <em>not</em> the best commute route to work:
<strong>Update: Google has optimized the route and now it&#8217;s right! No more Caltrain to Millbrae ;)</strong>
<iframe width="450" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=d&amp;hl=en&amp;geocode=&amp;time=&amp;date=&amp;ttype=&amp;saddr=391+San+Jose+Ave,+San+Francisco,+CA+94110&amp;daddr=370+Brannan+St,+San+Francisco,+CA+94107&amp;dirflg=r&amp;sll=37.765219,-122.407608&amp;sspn=0.045596,0.085745&amp;ie=UTF8&amp;t=p&amp;om=1&amp;start=0&amp;s=AARTsJrh20IOPdmJtp2qzoVV_ockoiir7A&amp;ll=37.690341,-122.427521&amp;spn=0.260813,0.439453&amp;z=11&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=d&amp;hl=en&amp;geocode=&amp;time=&amp;date=&amp;ttype=&amp;saddr=391+San+Jose+Ave,+San+Francisco,+CA+94110&amp;daddr=370+Brannan+St,+San+Francisco,+CA+94107&amp;dirflg=r&amp;sll=37.765219,-122.407608&amp;sspn=0.045596,0.085745&amp;ie=UTF8&amp;t=p&amp;om=1&amp;start=0&amp;ll=37.690341,-122.427521&amp;spn=0.260813,0.439453&amp;z=11&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>

<p>Still, I think it&#8217;s a great addition, especially if I was traveling farther than just to work, or outside of my normal stomping grounds.</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/32/google-adds-terrain-maps-and-public-transit-routing/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Installing Rails Today</title>
		<link>http://chuddup.com/blog/archive/31/installing-rails-today/</link>
		<comments>http://chuddup.com/blog/archive/31/installing-rails-today/#comments</comments>
		<pubDate>Thu, 17 May 2007 06:13:05 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/31/installing-rails-today/</guid>
		<description><![CDATA[<p>It seems that a lot of old blog posts are floating about on the web these days with instructions on how to install ruby/rails/mysql/etc. that are quite out of date. My post on the same topic included. I&#8217;d like to remedy that situation, since I just reinstalled my OS today and had to go through [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>It seems that a lot of old blog posts are floating about on the web these days with instructions on how to install ruby/rails/mysql/etc. that are quite out of date. <a href="http://chuddup.com/blog/archive/29/get-running-with-rails-on-os-x-tiger/">My post</a> on the same topic included. I&#8217;d like to remedy that situation, since I just reinstalled my OS today and had to go through the steps once again. So here you are, internets, my contribution to keeping blogged instructions up to date&#8230;</p>

<p>I&#8217;ll be covering the steps necessary to get the full Rails stack running on your Mac (Rails, Mongrel, and MySQL), just in case you want to click fewer links and get more done.</p>

<p>To reiterate:</p>

<blockquote>
  <h3>A Favor</h3>
  
  <p>Please don’t email me asking for help. I feel bad writing that, it feels pretty crummy to say, and I truly wish that I could answer specific questions about these instructions and help figure out why a certain step might have gone wrong for you, but I just can’t.</p>
  
  <p>Just make sure to follow each step (Install Xcode! Set your path!) and these instructions should &#8220;just work&#8221; for you.</p>
</blockquote>

<h3>Getting Started</h3>

<p>The major steps are</p>

<ol>
<li>Make sure you have XCode installed</li>
<li>Set up your $PATH</li>
<li>MacPorts!</li>
<li>Gems</li>
<li>MySQL</li>
<li>Fire it up!</li>
<li>Optional stuff (Subversion, RMagick, etc.)</li>
</ol>

<p>Let&#8217;s roll&#8230;
<a id="more-31"></a></p>

<p>Open a Terminal window, you&#8217;ll need it for most of these steps. Commands for the Terminal will appear like this:</p>

<pre><code>cd ~
which ruby
</code></pre>

<p>Just an example, no need to run that now, the good stuff is next!</p>

<h3 id="xcode">Install Apple&#8217;s XCode Tools</h3>

<p>You need a compiler to compile software (duh). Lucky for us, Apple has created a nice package that installs one for you (along with a host of other nice tools for developing Mac software that we won&#8217;t be using right now).</p>

<p><strong>Shortcut:</strong> if you have a directory called Developer at the root of your hard drive (the path is <code>/Developer</code>), these tools are already installed. Move to the next step!</p>

<p>To Install Xcode Tools:</p>

<ul>
<li>Put in your Mac OS X Install Disc or download the latest version of XCode Tools from <a href="http://connect.apple.com/">Apple Developer Connection</a></li>
<li>Open XcodeTools.mpkg</li>
<li>Click through the installation prompts</li>
</ul>

<p>Check it:</p>

<ul>
<li>You should now have a directory called <code>Developer</code> at the root of your hard drive.</li>
</ul>

<h3>Setting up your $PATH</h3>

<p>Some say the path to success is paved with good intentions. I say it starts with <code>/usr/local</code>.</p>

<p>Start in your Terminal. If you&#8217;ve already got a <code>.bash_profile</code> in your home folder, I trust you know how to edit it appropriately. Otherwise, do this:</p>

<pre><code>cd ~
touch .bash_profile
open .bash_profile
</code></pre>

<p>This will open TextEdit with <code>.bash_profile</code> activated. Add the following line to the file and save it:</p>

<pre><code>export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
</code></pre>

<p>The important detail here is that <code>/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:</code> comes before <code>$PATH</code>. The <code>mysql</code> part is for later, but I&#8217;m saving you some time by putting it in now.</p>

<p>Make sure the file is saved and go back to your Terminal:</p>

<pre><code>source ~/.bash_profile
echo $PATH
</code></pre>

<p>Confirm that the first thing in the output you see is<br />
<code>/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin</code> and if it&#8217;s not, make sure you&#8217;ve followed these instructions carefully. </p>

<p>Now double check that XCode is installed:</p>

<pre><code>which gcc
</code></pre>

<p>Confirm that the output you see is <code>/usr/bin/gcc</code>. If it&#8217;s not, you&#8217;ll need to go back and install Apple&#8217;s XCode Tools (<a href="#xcode">see above</a>).</p>

<p>All good? You&#8217;re ready to rock!</p>

<h3>MacPorts</h3>

<p>The <a href="http://www.macports.org/">MacPorts</a> (formerly DarwinPorts) package makes installing the rest of the software really easy. Let&#8217;s get Readline and Ruby. Download the latest distribution of MacPorts from <a href="">http://trac.macosforge.org/projects/macports/browser/downloads</a> and install it. Then:</p>

<pre><code>sudo port install readline
sudo port install ruby
</code></pre>

<h3>Getting RubyGems</h3>

<p>Before downloading this, we&#8217;ll create a directory to keep from littering your home folder:</p>

<pre><code>mkdir ~/src
cd ~/src
</code></pre>

<p>Now, download the latest release of RubyGems:</p>

<pre><code>curl -O http://rubyforge.org/frs/download.php/20585/rubygems-0.9.3.tgz
</code></pre>

<p>Install Rubygems:</p>

<pre><code>tar xzvf rubygems-0.9.3.tgz
cd rubygems-0.9.3
sudo /opt/local/bin/ruby setup.rb
cd ..
</code></pre>

<p>Get Rails and Mongrel Gems:</p>

<pre><code>sudo gem install rails --include-dependencies
sudo gem install mongrel --include-dependencies
</code></pre>

<h3>Install MySQL</h3>

<p>Download MySQL 5.0 the installer package right for your hardware:</p>

<p>http://mysql.org/downloads/mysql/5.0.html#macosx-dmg</p>

<p>Install MySQL (the installer package does us a favor and installs the MySQL server where it belongs, in /usr/local):</p>

<ul>
<li>Mount the disk image</li>
<li>Install the mysql-standard-5.x.xx-osx10.4&#8230; package</li>
<li>Install the MySQLStartupItem.pkg</li>
<li>Install the MySQL.prefPane (<strong>hint:</strong> you can double-click it)</li>
</ul>

<p>Start MySQL:</p>

<ul>
<li>Open System Preferences</li>
<li>Find the MySQL Preference Pane at the bottom</li>
<li>Start the MySQL server by clicking the big &#8220;Start&#8221; button</li>
<li>Be sure to check the box &#8220;Automatically start MySQL server on startup&#8221; so your app works after you reboot your machine</li>
</ul>

<p><em>Optionally</em> Install the MySQL Ruby bindings (for speed):</p>

<pre><code>sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
</code></pre>

<p>Choose the latest version <strong>for your platform</strong>, which is <code>(ruby)</code> since we&#8217;re <em>obviously</em> not on Windows.</p>

<p><em>Optionally</em> Install the graphical MySQL Administrator so you can avoid the command line:</p>

<ul>
<li>Download the GUI tools from <a href="http://mysql.he.net/downloads/gui-tools/5.0.html">MySQL GUI Tools Downloads</a></li>
</ul>

<p><strong>Note</strong>: By default, MySQL is installed with the user account <code>root</code> and no password. Documentation available <a href="http://dev.mysql.com/doc/refman/4.1/en/user-names.html">here</a> can show you how to change this to something more suitable (and secure). The Accounts section of the GUI tools can also be used to edit MySQL&#8217;s user accounts and passwords. <strong>Note:</strong> MySQL&#8217;s user accounts are completely separate and unrelated to Mac OS X/Unix accounts, the name <code>root</code> is just a coincidence. </p>

<h3>Time to Roll</h3>

<p>Now that you&#8217;ve got everything installed, you&#8217;re ready to write your Rails app! Get yourself in a brand new Terminal window in your development directory already&#8230;</p>

<p>Generate a Rails app:</p>

<pre><code>rails myapp
cd myapp
</code></pre>

<p>Start Mongrel:</p>

<pre><code>script/server
</code></pre>

<p>Hit <a href="http://localhost:3000/">your app</a> with your browser and read up at <a href="http://rubyonrails.org/">http://rubyonrails.org/</a>!</p>

<h3>Extras</h3>

<h4>Capistrano</h4>

<p>The best way to deploy your new Rails app.</p>

<pre><code>sudo gem install capistrano --include-dependencies
</code></pre>

<h4>Subversion</h4>

<p>With MacPorts installed, you can install subversion with:</p>

<pre><code>sudo port install subversion
</code></pre>

<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/31/installing-rails-today/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Heading South</title>
		<link>http://chuddup.com/blog/archive/30/heading-south/</link>
		<comments>http://chuddup.com/blog/archive/30/heading-south/#comments</comments>
		<pubDate>Wed, 07 Feb 2007 22:08:02 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/30/heading-south/</guid>
		<description><![CDATA[<p>Yeah. I don&#8217;t write much. I&#8217;ve been busy. You might get to find out why if you are in Austin the week of SXSW Interactive. Come to our party:</p>

<p>Back to work!</p>
]]></description>
			<content:encoded><![CDATA[<p>Yeah. I don&#8217;t write much. I&#8217;ve been busy. You might get to find out why if you are in Austin the week of SXSW Interactive. Come to our party:</p>

<p><img src="http://chuddup.com/blog/wp-content/uploads/satisfaction_sxsw.gif" alt="Satisfaction - 8-bit party" /></p>

<p>Back to work!</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/30/heading-south/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Get running with Rails on OS X Tiger</title>
		<link>http://chuddup.com/blog/archive/29/get-running-with-rails-on-os-x-tiger/</link>
		<comments>http://chuddup.com/blog/archive/29/get-running-with-rails-on-os-x-tiger/#comments</comments>
		<pubDate>Mon, 27 Nov 2006 18:43:11 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/29/get-running-with-rails-on-os-x-tiger/</guid>
		<description><![CDATA[<p>Follow these instructions and your shiny new MacBook will be ready for you to write the next hot Rails app in very little time.</p>

<p>I&#8217;ll be covering the steps necessary to get the full Rails stack running on your Mac (Rails 1.2, mongrel, and MySQL 5). I&#8217;ll also tell you the easiest way to get Subversion [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>Follow these instructions and your shiny new MacBook will be ready for you to write the next hot Rails app in very little time.</p>

<p>I&#8217;ll be covering the steps necessary to get the full Rails stack running on your Mac (Rails 1.2, mongrel, and MySQL 5). I&#8217;ll also tell you the easiest way to get Subversion and RMagick working, in case you want to click fewer links and get more done.</p>

<p>This post is meant as an update to the excellent, but now out-of-date, instructions written by Dan Benjamin at hivelogic.com: <a href="http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger">Building Ruby, Rails, LightTPD, and MySQL on Tiger</a></p>

<p>Dan says it best, so I&#8217;ll quote him here. Please understand that this applies to me as well.</p>

<blockquote>
  <h3>A Favor</h3>
  
  <p>Please don’t email me asking for help. I feel bad writing that, it feels pretty crummy to say, and I truly wish that I could answer specific questions about these instructions and help figure out why a certain step might have gone wrong for you, but I just can’t.</p>
  
  <p>Just make sure to follow each step (Install Xcode! Set your path!) and these instructions should &#8220;just work&#8221; for you.</p>
</blockquote>

<h3>Getting Started</h3>

<p>The major steps are</p>

<ol>
<li>Make sure you have XCode installed</li>
<li>Set up your $PATH</li>
<li><del datetime="2007-02-16T18:40:06+00:00">Compile Ruby</del></li>
<li>Get gems</li>
<li>Install MySQL</li>
<li>Fire it up!</li>
<li>Optional stuff (Subversion, RMagick, etc.)</li>
</ol>

<p><a id="more-29"></a></p>

<p>Open a Terminal window, you&#8217;ll need it for most of these steps. Commands for the Terminal will appear like this:</p>

<pre><code>cd ~
which ruby
</code></pre>

<p>Just an example, no need to run that now, the good stuff is next!</p>

<h3 id="xcode">Install Apple&#8217;s XCode Tools</h3>

<p>You need a compiler to compile software (duh). Lucky for us, Apple has created a nice package that installs one for you (along with a host of other nice tools for developing Mac software that we won&#8217;t be using right now).</p>

<p><strong>Shortcut:</strong> if you have a directory called Developer at the root of your hard drive (the path is <code>/Developer</code>), these tools are already installed. Move to the next step!</p>

<p>To Install Xcode Tools:</p>

<ul>
<li>Put in your Mac OS X Install Disc or download the latest version of XCode Tools from <a href="http://connect.apple.com/">Apple Developer Connection</a></li>
<li>Open XcodeTools.mpkg</li>
<li>Click through the installation prompts</li>
</ul>

<p>Check it:</p>

<ul>
<li>You should now have a directory called <code>Developer</code> at the root of your hard drive.</li>
</ul>

<h3>Setting up your $PATH</h3>

<p>Some say the path to success is paved with good intentions. I say it starts with <code>/usr/local</code>.</p>

<p>Start in your Terminal. If you&#8217;ve already got a <code>.bash_profile</code> in your home folder, I trust you know how to edit it appropriately. Otherwise, do this:</p>

<pre><code>cd ~
touch .bash_profile
open .bash_profile
</code></pre>

<p>This will open TextEdit with <code>.bash_profile</code> activated. Add the following line to the file and save it:</p>

<pre><code>export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
</code></pre>

<p>The important detail here is that <code>/usr/local/bin:/usr/local/sbin:</code> comes before <code>$PATH</code>. The <code>mysql</code> part is for later, but I&#8217;m saving you some time by putting it in now.</p>

<p>Make sure the file is saved and go back to your Terminal:</p>

<pre><code>source ~/.bash_profile
echo $PATH
</code></pre>

<p>Confirm that the first thing in the output you see is<br />
<code>/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin</code> and if it&#8217;s not, make sure you&#8217;ve followed these instructions carefully. </p>

<p>Now double check that XCode is installed:</p>

<pre><code>which gcc
</code></pre>

<p>Confirm that the output you see is <code>/usr/bin/gcc</code>. If it&#8217;s not, you&#8217;ll need to go back and install Apple&#8217;s XCode Tools (<a href="#xcode">see above</a>).</p>

<p>All good? You&#8217;re ready to rock!</p>

<h3>Compiling Ruby</h3>

<p>Before downloading anything, we&#8217;ll create a directory to keep from littering your home folder:</p>

<pre><code>mkdir src
cd src
</code></pre>

<p>Mac OS X&#8217;s stock Ruby installation is unfortunately busted, so we&#8217;ll be building our own (don&#8217;t worry, it&#8217;s easy).</p>

<p>First, you&#8217;ll need to download Readline, expand the archive, and install it:</p>

<pre><code>curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
tar xzvf readline-5.2.tar.gz
cd readline-5.2
./configure --prefix=/usr/local
make
sudo make install
cd ..
</code></pre>

<p>Now, Ruby:</p>

<pre><code>curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz
tar xzvf ruby-1.8.4.tar.gz
cd ruby-1.8.4
./configure --prefix=/usr/local --enable-pthread --with-readline-dir=/usr/local
make
sudo make install
sudo make install-doc
cd ..
</code></pre>

<h3>Getting RubyGems</h3>

<p>Download RubyGems:</p>

<pre><code>curl -O http://rubyforge.iasi.roedu.net/files/rubygems/rubygems-0.9.0.tgz
</code></pre>

<p>Install Rubygems:</p>

<pre><code>tar xzvf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo /usr/local/bin/ruby setup.rb
cd ..
</code></pre>

<p>Get Important Gems:</p>

<pre><code>sudo gem install rails --include-dependencies
sudo gem install mongrel --include-dependencies
</code></pre>

<h3>Install MySQL</h3>

<p>Download MySQL 5.0:</p>

<ul>
<li><a href="http://mysql.he.net/Downloads/MySQL-5.0/mysql-standard-5.0.27-osx10.4-powerpc.dmg">PPC</a> or <a href="http://mysql.he.net/Downloads/MySQL-5.0/mysql-standard-5.0.27-osx10.4-i686.dmg">Intel</a></li>
</ul>

<p>Install MySQL (the installer package does us a favor and installs MySQL where it belongs, in /usr/local):</p>

<ul>
<li>Mount the disk image</li>
<li>Install the mysql-standard-5.0.27-osx10.4&#8230; package</li>
<li>Install the MySQLStartupItem.pkg</li>
<li>Install the MySQL.prefPane (<strong>hint:</strong> you can double-click it)</li>
</ul>

<p>Start MySQL:</p>

<ul>
<li>Open System Preferences</li>
<li>Find the MySQL Preference Pane at the bottom</li>
<li>Start the MySQL server by clicking the big &#8220;Start&#8221; button</li>
<li>Be sure to check the box &#8220;Automatically start MySQL server on startup&#8221; so your app works after you reboot your machine</li>
</ul>

<p><em>Optionally</em> Install the MySQL Ruby bindings (for speed):</p>

<pre><code>sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
</code></pre>

<p><strong>Note:</strong> If you have a an Intel Mac, you&#8217;ll need to properly compile the gem after it&#8217;s installed (there&#8217;s a bug). See the instructions <a href="http://www.epistemologic.com/articles/2006/11/13/the-mysql-gem-and-intel-macs">here</a>.</p>

<p>Choose the latest version <strong>for your platform</strong>, which is <code>(ruby)</code> since we&#8217;re <em>obviously</em> not on Windows.</p>

<p><em>Optionally</em> Install the graphical MySQL Administrator so you can avoid the command line:</p>

<ul>
<li>Download the GUI tools from <a href="http://mysql.he.net/downloads/gui-tools/5.0.html">MySQL GUI Tools Downloads</a></li>
</ul>

<p>By default, MySQL is installed with the user account <code>root</code> and no password. Documentation available <a href="http://dev.mysql.com/doc/refman/4.1/en/user-names.html">here</a> can show you how to change this to something more suitable (and secure). The Accounts section of the GUI tools can also be used to edit MySQL&#8217;s user accounts and passwords. <strong>Note:</strong> MySQL&#8217;s user accounts are completely separate and unrelated to Mac OS X/Unix accounts, the name <code>root</code> is just a coincidence. </p>

<h3>Time to Roll</h3>

<p>Now that you&#8217;ve got everything installed, you&#8217;re ready to write your Rails app! Get yourself in a brand new Terminal window in your development directory already&#8230;</p>

<p>Generate a Rails app:</p>

<pre><code>rails myapp
cd myapp
</code></pre>

<p>Start Mongrel:</p>

<pre><code>script/server
</code></pre>

<p>Hit <a href="http://localhost:3000/">your app</a> with your browser and read up at <a href="http://rubyonrails.org/">http://rubyonrails.org/</a>!</p>

<h3>Extras</h3>

<h4>Capistrano</h4>

<p>The best way to deploy your new Rails app.</p>

<pre><code>sudo gem install capistrano --include-dependencies
</code></pre>

<h4>Prerequisites for the following optional software</h4>

<p>The <a href="http://www.macports.org/">MacPorts</a> (formerly DarwinPorts) package makes installing subversion and RMagick (with ImageMagick) really easy. Open a Terminal in your <code>src</code> folder where we&#8217;ve been downloading all our software.</p>

<pre><code>curl -O http://svn.macports.org/repository/macports/downloads/DarwinPorts-1.3.2/DarwinPorts-1.3.2.tar.gz
tar xzvf DarwinPorts-1.3.2.tar.gz
cd DarwinPorts-1.3.2
./configure --prefix=/usr/local
make
sudo make install
cd ..
</code></pre>

<h4>Subversion</h4>

<p>With MacPorts installed, you can install subversion with:</p>

<pre><code>sudo port install subversion
</code></pre>

<h4>RMagick</h4>

<p>Likewise, RMagick and its dependencies can be installed with:</p>

<pre><code>sudo port install imagemagick
sudo gem install rmagick
</code></pre>

<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/29/get-running-with-rails-on-os-x-tiger/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Play XviD with audio in Quicktime Player</title>
		<link>http://chuddup.com/blog/archive/28/play-xvid-with-audio-in-quicktime-player/</link>
		<comments>http://chuddup.com/blog/archive/28/play-xvid-with-audio-in-quicktime-player/#comments</comments>
		<pubDate>Tue, 21 Nov 2006 08:40:28 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/28/play-xvid-with-audio-in-quicktime-player/</guid>
		<description><![CDATA[<p>I don&#8217;t know how many people care, but sometimes I just want to use Quicktime player (or another Core Audio-based app) to play video files. The problem is, a lot of files these days have 5.1 channel AC-3 audio.</p>

<p>I finally found the key: A52Codec</p>

<p>Download it here</p>

<p>Now, off to watch Heroes in HDTV&#8230;</p>
]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how many people care, but sometimes I just want to use Quicktime player (or another Core Audio-based app) to play video files. The problem is, a lot of files these days have 5.1 channel AC-3 audio.</p>

<p>I finally found the key: A52Codec</p>

<p><a href="http://trac.cod3r.com/a52codec">Download it here</a></p>

<p>Now, off to watch Heroes in HDTV&#8230;</p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/28/play-xvid-with-audio-in-quicktime-player/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Drop-in Yahoo Browser Based Authentication for Rails</title>
		<link>http://chuddup.com/blog/archive/27/drop-in-yahoo-browser-based-authentication-for-rails/</link>
		<comments>http://chuddup.com/blog/archive/27/drop-in-yahoo-browser-based-authentication-for-rails/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 05:42:13 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Web/Technology</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/27/drop-in-yahoo-browser-based-authentication-for-rails/</guid>
		<description><![CDATA[<p>Tonight I&#8217;m releasing my first Rails plugin. This is the result of about half the work I did with my team at Rubyred Labs at Yahoo Hack Day 2006. I wrote the guts, but generous amounts of Rails plugin goodness were provided by Scott Fleckenstein.</p>

<p>The Plugin:</p>

<p>It&#8217;s a drop-in addition to ActionController that allows you to [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>Tonight I&#8217;m releasing my first <a href="http://technorati.com/tags/rails" rel="tag">Rails</a> plugin. This is the result of about half the work I did with my team at <a href="http://rubyredlabs.com/" rel="tag">Rubyred Labs</a> at <a href="http://technorati.com/tags/yahoohackday" rel="tag">Yahoo Hack Day 2006</a>. I wrote the guts, but generous amounts of Rails plugin goodness were provided by <a href="http://nullstyle.com/">Scott Fleckenstein</a>.</p>

<p><strong>The Plugin:</strong></p>

<p>It&#8217;s a drop-in addition to ActionController that allows you to define a consumer of Yahoo&#8217;s unified login scheme that was released last week, called Browser Based Authentication, or BBAuth. <a href="http://developer.yahoo.com/auth/">More info</a></p>

<p>It&#8217;s configurable so that you may define your own endpoint within the Rails app and a controller method is defined to allow you to easily retrieve the necessary credentials for authenticated API calls after the initial login. It&#8217;s up to you to handle the storage of the returned <code>cookie</code> and <code>wssid</code>.</p>

<p>Many of Yahoo&#8217;s APIs are currently open, and each of them is slightly different. I left this complexity out of the plugin to make it as simple to use and unobtrusive as possible. You can contact me at <strong>cameron at this domain</strong> if something is busted. I&#8217;d like this plugin  to &#8220;just work&#8221; so if something is wrong, let me know.</p>

<p>You can see the plugin in action in a dummy application at <a href="http://hackday2006.rubyredlabs.com/">http://hackday2006.rubyredlabs.com/</a></p>

<p><strong>Instructions:</strong></p>

<p>Unzip the archive and drop it in your vendor/plugins folder.</p>

<p>You&#8217;ll need to <strong>register your application with Yahoo</strong> <a href="http://developer.yahoo.com/auth/appreg.html">here</a>. Configuring the plugin is easy<em>, after you have followed all the instructions on Yahoo&#8217;s developer website about authenticating your application&#8217;s domain</em>.
The only necessary configuration is to place the following in <code>config/yahoo.yml</code>:</p>

<pre>
<code>application_id: YOUR_APPLICATION_ID
secret: YOUR_SECRET</code>
</pre>

<p>Download: <a href="http://chuddup.com/yahoo_bbauth.zip">Yahoo BBAuth plugin</a></p>

<p><strong>Sample Controller</strong></p>

<pre><code>class UsersController &lt; ApplicationController
  authorizes_through_yahoo

  def index
  end

  verify :params =&gt; [:token, :sig, :appid, :ts], :only =&gt; :get_credentials, :redirect_to =&gt; :index
  def get_credentials
    @credentials = request_yahoo_credentials(params[:token])
  end

end
</code></pre>

<p>In this example, assuming the route <code>':controller/:action/:id'</code> exists, the value to enter in &#8220;Web Application URL&#8221; when registering your app with Yahoo is <code>http://<i>your-domain.com</i>/users/get_credentials</code></p>

<p><strong>Update:</strong> Looks like the error messages weren&#8217;t being passed through to the exception. Code has been updated!</p>

<p>NEW:</p>

<pre><code>    raise YahooAuthorizationException.new("Yahoo BBAuth error: %s %s" % 
      [ doc.elements['//Error/ErrorCode'].text.strip,
        doc.elements['//Error/ErrorDescription'].text.strip ]) unless doc.elements['//Success']
</code></pre>

<p>OLD:</p>

<pre><code>    raise YahooAuthorizationException.new("Yahoo BBAuth error: :code :message" % 
      { :code => doc.elements['//Error/ErrorCode'].text.strip,
        :message => doc.elements['//Error/ErrorDescription'].text.strip }) unless doc.elements['//Success']
</code></pre>

<p><small>Technorati Tags: <a href="http://technorati.com/tags/yahoo" rel="tag">yahoo</a> <a href="http://technorati.com/tags/hackday06" rel="tag">hackday06</a> <a href="http://technorati.com/tags/bbauth" rel="tag">bbauth</a> <a href="http://technorati.com/tags/yahoobbauth" rel="tag">yahoobbauth</a> <a href="http://technorati.com/tags/authentication" rel="tag">authentication</a> <a href="http://technorati.com/tags/rubyredlabs" rel="tag">rubyredlabs</a></small></p>
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/27/drop-in-yahoo-browser-based-authentication-for-rails/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Birfffffday</title>
		<link>http://chuddup.com/blog/archive/25/birfffffday/</link>
		<comments>http://chuddup.com/blog/archive/25/birfffffday/#comments</comments>
		<pubDate>Mon, 26 Jun 2006 20:36:31 +0000</pubDate>
		<dc:creator>cameron</dc:creator>
		
	<category>Praise</category>
	<category>San Francisco</category>
		<guid isPermaLink="false">http://chuddup.com/blog/archive/25/birfffffday/</guid>
		<description><![CDATA[<p>So&#8230; I had a lot of fun turning 25. Thanks to everyone who made it to my sloshball party and BBQ, and thanks to everyone who wished me well  or told me &#8220;happy birthday.&#8221;</p>

<p>You all rock! And for that, you get Rocky&#8230; Ninja Rocky:</p>

<p>Woo hoo!</p>

<p>btw: I&#8217;m sure you can find more silly pictures [...]</p>
]]></description>
			<content:encoded><![CDATA[<p>So&#8230; I had a lot of fun turning 25. Thanks to everyone who made it to my sloshball party and BBQ, and thanks to everyone who wished me well  or told me &#8220;happy birthday.&#8221;</p>

<p> You all rock! And for that, you get Rocky&#8230; Ninja Rocky:</p>

<p><a href="http://flickr.com/photos/40732559127@N01/175602177" title="The Rocky Balboa Ninja Viper"><img src="http://static.flickr.com/65/175602177_681a780556_d.jpg" /></a></p>

<p>Woo hoo!</p>

<p>btw: I&#8217;m sure you can find more silly pictures by looking for ceedub25 on flickr.<br/>
</p>

<!-- technorati tags begin --><p style="font-size:10px;text-align:right;">technorati tags:<a href="http://technorati.com/tag/ceedub25" rel="tag">ceedub25</a>, <a href="http://technorati.com/tag/yoda" rel="tag">yoda</a>, <a href="http://technorati.com/tag/birthday" rel="tag">birthday</a></p><!-- technorati tags end -->
]]></content:encoded>
			<wfw:commentRSS>http://chuddup.com/blog/archive/25/birfffffday/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
