<?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>Chris Johnston &#187; Ruby on Rails</title>
	<atom:link href="http://www.fuzzylizard.com/archives/category/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fuzzylizard.com</link>
	<description>Web development and design with a little VFX thrown in for fun</description>
	<lastBuildDate>Mon, 14 Sep 2009 23:06:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multistage deployments with Capistrano</title>
		<link>http://www.fuzzylizard.com/archives/2009/04/25/1046/</link>
		<comments>http://www.fuzzylizard.com/archives/2009/04/25/1046/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 15:52:33 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=1046</guid>
		<description><![CDATA[I have been trying to set up a Capistrano script for deploying to a staging and production server. I found this very well written tutorial showing how to set up the various cap scripts to work with mod_rails (Passenger). 
One note, Capistrano does not copy over the database.yml file. You need to put this in [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to set up a Capistrano script for deploying to a staging and production server. I found <a href="http://www.cjohansen.no/en/rails/multi_staging_environment_for_rails_using_capistrano_and_mod_rails">this very well written tutorial</a> showing how to set up the various cap scripts to work with mod_rails (Passenger). </p>
<p>One note, Capistrano does not copy over the database.yml file. You need to put this in yourself. This tripped me up for a while since I was assuming that it would somehow magically take the database.yml.template file I had and turn it into a database.yml file that I would then have to configure. The Ruby magic doesn&#8217;t extend that far <img src='http://www.fuzzylizard.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2009/04/25/1046/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep CSS layout in layouts not in view pages</title>
		<link>http://www.fuzzylizard.com/archives/2009/04/16/1040/</link>
		<comments>http://www.fuzzylizard.com/archives/2009/04/16/1040/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 01:11:43 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=1040</guid>
		<description><![CDATA[When using layouts in Rails, I strongly suggest keeping as much of the container elements in the layout and using content_for to create sections in which content can be placed.
I am working on a site right now that has used the YUI Grids to layout the site (something I highly recommend for anyone designing a [...]]]></description>
			<content:encoded><![CDATA[<p>When using layouts in Rails, I strongly suggest keeping as much of the container elements in the layout and using <code>content_for</code> to create sections in which content can be placed.</p>
<p>I am working on a site right now that has used the YUI Grids to layout the site (something I highly recommend for anyone designing a site from scratch). Most of the site uses a two column layout. The <code>application.html.erb</code> file looks like this:</p>
<pre name="code" class="html">
&lt;body&gt;
  &lt;div id="doc" class="yui-t6"&gt;
    &lt;div id="hd" role="banner"&gt;
      &lt;%= render_partial "shared/header" %&gt;
    &lt;/div&gt;

    &lt;div id="bd" role="main"&gt;
      &lt;%= yield :content %&gt;
    &lt;/div&gt;

    &lt;div id="ft" role="contentinfo"&gt;
      &lt;%= render_partial "shared/footer" %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
</pre>
<p>What is missing is the part that divides the page into your content area and your, in this case, right-hand side area. This part was placed in the rest of the view files. Not only does this mean that it is repeated everywhere and a huge pain to change, it also means that it is much harder for coders, who may not know YUI CSS Grids, to properly lay out pages. In the case of the app that I am modifying, it has also meant that parts of the CSS layout are strewn careless between regular pages and partials.</p>
<p>Instead, this is how the layout page should look:</p>
<pre name="code" class="html">
&lt;body&gt;
  &lt;div id="doc" class="yui-t6"&gt;
    &lt;div id="hd" role="banner"&gt;
      &lt;%= render_partial "shared/header" %&gt;
    &lt;/div&gt;

    &lt;div id="bd" role="main"&gt;
      &lt;div id="yui-main"&gt;
        &lt;div class="yui-b"&gt;
          &lt;div class="yui-g"&gt;
            &lt;%= yield :content %&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="yui-b"&gt;
        &lt;%= yield :side_content %&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div id="ft" role="contentinfo"&gt;
      &lt;%= render_partial "shared/footer" %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
</pre>
<p>This keeps everything clean and makes for view pages that look like the following.</p>
<pre name="code" class="html">
&lt;% content_for :content do %&gt;
  put content here
&lt;% end %&gt;

&lt;% content_for :side_content do %&gt;
  put side content here
&lt;% end %&gt;
</pre>
<p>I think that makes it much easier to see what is happening within view pages. It also keeps all the layout code in one place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2009/04/16/1040/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bort &#8211; a new way to start Rails projects</title>
		<link>http://www.fuzzylizard.com/archives/2008/09/15/981/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/09/15/981/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 12:07:57 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=981</guid>
		<description><![CDATA[I found a great way of starting a new Rails project. It is called Bort and has been put together by Jim Neath. It includes RESTful Authentication, Will Paginate, RSpec and RSpec for Rails, Exception Notifier, Capistrano recipes and other Rails plug-ins in one small downloadable zip file. The uncompressed zip file then serves as [...]]]></description>
			<content:encoded><![CDATA[<p>I found a great way of starting a new Rails project. It is called <a href="http://jimneath.org/2008/09/09/bort-base-rails-application/">Bort and has been put together by Jim Neath.</a> It includes RESTful Authentication, Will Paginate, RSpec and RSpec for Rails, Exception Notifier, Capistrano recipes and other Rails plug-ins in one small downloadable zip file. The uncompressed zip file then serves as the base for your new Rails app.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/09/15/981/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get Phusion Passenger and ImageMagick to work together?</title>
		<link>http://www.fuzzylizard.com/archives/2008/07/05/954/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/07/05/954/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 08:12:24 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Apple Mac]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=954</guid>
		<description><![CDATA[For Studio Gallery, I want people to have the ability to upload avatars for the clients that they create. I am using the Paperclip plug-in for this and when running the app via script/server this works great. I installed ImageMagick and Paperclip is able to find it since all the right paths are set in [...]]]></description>
			<content:encoded><![CDATA[<p>For Studio Gallery, I want people to have the ability to upload avatars for the clients that they create. I am using the <a href="http://www.thoughtbot.com/projects/paperclip">Paperclip plug-in</a> for this and when running the app via <code>script/server</code> this works great. I installed <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a> and Paperclip is able to find it since all the right paths are set in my <code>.bash_profile</code> file.</p>
<p>The problem is that I can&#8217;t get Paperclip or ImageMagick to work when running the app via <a href="http://www.modrails.com/">Passenger</a>. I have added the following lines to my <code>/etc/profile</code> file:</p>
<pre>
#ImageMagick
export MAGICK_HOME="/usr/local/ImageMagick-6.4.1"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"
export PATH=$MAGICK_HOME/bin:/usr/bin:$PATH
</pre>
<p>But so far, it seems that Apache or Passenger is unable to find ImageMagick. Anyone have any ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/07/05/954/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Installing Phusion&#8217;s Passenger on Leopard (OS X 10.5)</title>
		<link>http://www.fuzzylizard.com/archives/2008/05/29/947/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/05/29/947/#comments</comments>
		<pubDate>Thu, 29 May 2008 06:15:34 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=947</guid>
		<description><![CDATA[This is what I had to do to get Passenger (aka mod_rails) up and running on my Mac. My computer is running OS X 10.5 with a default Ruby and Rails install. The websites I referenced for all the steps are listed at the end.
Prerequisites:
You will need to have XCode installed as mod_passenger.so needs to [...]]]></description>
			<content:encoded><![CDATA[<p>This is what I had to do to get <a href="http://www.modrails.com/">Passenger (aka mod_rails)</a> up and running on my Mac. My computer is running OS X 10.5 with a default Ruby and Rails install. The websites I referenced for all the steps are listed at the end.</p>
<p>Prerequisites:<br />
You will need to have <a href="http://developer.apple.com/tools/xcode/">XCode</a> installed as <code>mod_passenger.so</code> needs to be compiled.</p>
<h2>Installing Passenger Gem</h2>
<p>The first thing is to install and build the Passenger gem.</p>
<pre>
$ sudo gem install passenger
$ sudo passenger-install-apache2-module
</pre>
<p>The second line will compile <code>mod_passenger.so</code> and launch an installer script. At the end of the script there will be 3 lines that you need to add to your Apache configuration in order for anything to work. Copy these lines directly from the install script as they may be unique to your computer.</p>
<h2>Configuring Apache httpd.conf</h2>
<p>In this section, we need to configure Apache so it can properly use mod_rails and access your Virtual hosts, which we will setup later. The lines you copied in the previous step need to be added to one of two files &#8211; <code>/etc/apache2/httpd-conf</code> or your personal configuration file, in my case <code>/etc/apache2/users/chrisjohnston.conf</code>. it doesn&#8217;t matter which one you pick. In getting this all running, I used both files and things worked fine. In the end, I picked my personal config file because it kept things cleaner.</p>
<p>To open the file, use the following:</p>
<pre>
$ sudo vim /etc/apache2/users/chrisjohnston.conf
</pre>
<p>This is what my file looks like. I will explain the various parts after the snippet.</p>
<pre>
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

RailsEnv development

&lt;Directory "/Users/chrisjohnston/Sites/"&gt;
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

&lt;Directory "/Users/chrisjohnston/Dev/"&gt;
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
</pre>
<p>The first three lines load mod_passenger.so and set it up. The <code>RailsEnv development</code> line is needed in order to run the server in development mode. If this is to be a production server, then you can leave this line out as it defaults to production.</p>
<p>The next important part of the file is</p>
<pre>
&lt;Directory "/Users/chrisjohnston/Dev/"&gt;
    Order allow,deny
    Allow from all
&lt;/Directory&gt;
</pre>
<p>This gives you access to all the files below the given directory. This is important if you want things like stylesheets or images to load. We will also come back to this when we set up virtual hosts for the site.</p>
<h2>Setting up Virtual Hosts</h2>
<p>The next thing to do is to set up a virtual host for your website. In order for this to work, first open the apache httpd.conf file</p>
<pre>
$ sudo vim /etc/apache2/httpd.conf
</pre>
<p>and ensure the following line is uncommented, otherwise, nothing else beyond this point will work.</p>
<pre>
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
</pre>
<p>Once you have uncommented line, open up the <code>httpd-vhosts.conf</code> file and add a virtual host pointing to where you rails app is. Also, ensure that <code>NameVirtualHost *:80</code> is uncommented.</p>
<pre>
$ vim /private/etc/apache2/extra/httpd-vhosts.conf
</pre>
<p>Here is what mine looks like:</p>
<pre>
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

# Rails apps
&lt;VirtualHost *:80&gt;
    DocumentRoot "/Users/chrisjohnston/Dev/studio_gallery/public"
    ServerName dev.studiogallery.com
    ErrorLog "/Users/chrisjohnston/Dev/studio_gallery/log/error.log"
&lt;/VirtualHost&gt;
</pre>
<p>There may be two dummy virtual hosts listed in the file. Either comment these out or delete them. They will cause errors when you restart the server.</p>
<p>In the snippet above, you can see that I have set up a <code>ServerName</code> for my site. In order to navigate to this (without ending up searching for it on the net) we need to modify the <code>/etc/hosts</code> file. You need to add a line that tells your computer to associate the domain you created with your computer.</p>
<pre>
# Virtual hosts on this computer
127.0.0.1       dev.studiogallery.com
</pre>
<p>Now we can restart Apache.</p>
<pre>
$ sudo apachectl restart
</pre>
<p>And if everything goes well, when you navigate to your virtual site, your Rails app should come up.</p>
<p>From the <a href="http://napkin.highgroove.com/articles/2008/05/27/development-with-rails-passenger-aka-mod_rails-on-mac">highgroove Studio&#8217;s The Napkin website</a>, I also added the following to my <code>.bash_profile</code> file:</p>
<pre name="code">
# Use this in any RAILS_ROOT dir. That restart.txt file tells mod_rails to restart this app.
# You'll want to do this when (for example) you install a new plugin.
alias restart_rails='touch tmp/restart.txt'

# By default, your app's error log now goes here. Unless you configure your apps otherwise,
# it's helpful to have an alias to take you to your error log quickly.
alias apache_logs='cd /private/var/log/apache2/'

# You'll be adding to your vhosts configuration everytime you introduce a new Rails app.
# Might as well make it a shortcut
alias vhosts='sudo vi /private/etc/apache2/extra/httpd-vhosts.conf'

# Dito with hosts
alias hosts='sudo vi /etc/hosts'

# You'll need to restart apache whenever you make a change to vhosts.
# You can also click System Preference->Sharing->Web Sharing, but this is quicker.
alias apache_restart='sudo apachectl restart'
</pre>
<p>References:</p>
<ul>
<li><a href="http://napkin.highgroove.com/articles/2008/05/27/development-with-rails-passenger-aka-mod_rails-on-mac">highgroove Studio, The Napking &#8211; Development with Rails + Passenger (AKA mod_rails) on Mac</a></li>
<li><a href="http://www.fngtps.com/2008/04/using-passenger-on-osx-for-rails-development">Fingertips website &#8211; Using Passenger on OSX for Rails development</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/05/29/947/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Starting open source github project &#8211; Studio Gallery</title>
		<link>http://www.fuzzylizard.com/archives/2008/05/04/939/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/05/04/939/#comments</comments>
		<pubDate>Sun, 04 May 2008 05:46:40 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=939</guid>
		<description><![CDATA[As part of a larger project, I am starting a new open source Github project &#8211; Studio Gallery. It is a Ruby on Rails application aimed at professional photographers. 
The app will allow photographers to create galleries for clients, uploading photos from photo shoots. Once the gallery is created, clients can log on and select [...]]]></description>
			<content:encoded><![CDATA[<p>As part of a larger project, I am starting a new open source <a href="http://github.com">Github</a> project &#8211; <a href="http://github.com/fuzzylizard/studio_gallery/tree/master">Studio Gallery</a>. It is a Ruby on Rails application aimed at <a href="http://www.daniellejohnston.ca">professional photographers</a>. </p>
<p>The app will allow photographers to create galleries for clients, uploading photos from photo shoots. Once the gallery is created, clients can log on and select the photos they want to order. Other features include the ability to rate photos and filter by ratings as well as pick the size of print to be ordered.</p>
<p>The project is just beginning, so nothing exists for it yet except the Github repository. I will putting up a Trac site or Wiki for it soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/05/04/939/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby and Upgrading to Leopard</title>
		<link>http://www.fuzzylizard.com/archives/2007/12/06/914/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/12/06/914/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 05:06:22 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Apple Mac]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/12/06/914/</guid>
		<description><![CDATA[I recently upgraded my mac to OS X 10.5 and had some problems installing the Ruby gem Hpricot. This particular gem is compiled from source when it is installed (on a Mac at least, no idea about Windows or Linux). When I tried to install it, it kept throwing an error and failing. The problem [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my mac to OS X 10.5 and had some problems installing the Ruby gem <a href="http://code.whytheluckystiff.net/hpricot/">Hpricot</a>. This particular gem is compiled from source when it is installed (on a Mac at least, no idea about Windows or Linux). When I tried to install it, it kept throwing an error and failing. The problem was that I had forgotten to also upgrade Xcode, so it was being compiled with an old copy of gcc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/12/06/914/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails user group in Toronto</title>
		<link>http://www.fuzzylizard.com/archives/2007/12/05/913/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/12/05/913/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 04:57:33 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/12/05/913/</guid>
		<description><![CDATA[I found this the other day and thought it might be of interest to Ruby on Rails developers in Toronto. Unspace, a Toronto software development company, is hosting Toronto Rails Pub Nite. They have a mailing list you can sign up on for details and reminders.
]]></description>
			<content:encoded><![CDATA[<p>I found this the other day and thought it might be of interest to Ruby on Rails developers in Toronto. Unspace, a Toronto software development company, is hosting <a href="http://unspace.ca/innovation/pubnite">Toronto Rails Pub Nite.</a> They have a mailing list you can sign up on for details and reminders.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/12/05/913/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What web design app to use for Rails development on OS X?</title>
		<link>http://www.fuzzylizard.com/archives/2007/11/27/912/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/11/27/912/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 04:57:32 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Apple Mac]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/11/27/912/</guid>
		<description><![CDATA[The subject line basically says it all; what web design application are people using for Ruby on Rails projects on OS X? My first guess is TextMate. Are there any apps out there that support Rails layouts and ERB?
I am currently taking a look at Panic&#8217;s Coda and am really impressed with what I am [...]]]></description>
			<content:encoded><![CDATA[<p>The subject line basically says it all; what web design application are people using for Ruby on Rails projects on OS X? My first guess is <a href="http://macromates.com/">TextMate</a>. Are there any apps out there that support Rails layouts and ERB?</p>
<p>I am currently taking a look at <a href="http://www.panic.com/coda/">Panic&#8217;s Coda</a> and am really impressed with what I am seeing. Anyone have any other suggestions?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/11/27/912/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Problem installing native Ruby MySQL driver on OS X</title>
		<link>http://www.fuzzylizard.com/archives/2007/10/15/906/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/10/15/906/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 19:51:15 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/10/15/906/</guid>
		<description><![CDATA[In case anyone else has the same problem installing the native Ruby MySQL driver onto their Mac, here is the fix that worked for me.
I was upgrading my install using the HiveLogic instructions and kept getting the following error every time I went to install the mysql gem.

mysql.c: In function 'Init_mysql':
mysql.c:2015: error: 'ulong' undeclared (first [...]]]></description>
			<content:encoded><![CDATA[<p>In case anyone else has the same problem installing the native Ruby MySQL driver onto their Mac, here is the <a href="http://jlaine.net/2006/10/3/installing-ruby-mysql-driver-on-os-x">fix that worked for me</a>.</p>
<p>I was upgrading my install using the <a href="http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx">HiveLogic instructions</a> and kept getting the following error every time I went to install the mysql gem.</p>
<pre>
mysql.c: In function 'Init_mysql':
mysql.c:2015: error: 'ulong' undeclared (first use in this function)
mysql.c:2015: error: (Each undeclared identifier is reported only once
mysql.c:2015: error: for each function it appears in.)
mysql.c:2015: error: parse error before numeric constant
mysql.c:2018: error: parse error before numeric constant
make: *** [mysql.o] Error 1
</pre>
<p>A little Googling later, and I found a solution on the <a href="http://jlaine.net/2006/10/3/installing-ruby-mysql-driver-on-os-x">jlaine.net website.</a> There are several other solutions listed in the comments as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/10/15/906/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
