<?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>dec0der &#187; ultrasphinx</title>
	<atom:link href="http://blog.d27n.com/tags/ultrasphinx/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.d27n.com</link>
	<description>the d27n blog</description>
	<lastBuildDate>Fri, 27 Aug 2010 03:03:47 +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>Mac OS X Snow Leopard + Rails, MySQL, and Sphinx</title>
		<link>http://blog.d27n.com/2009/08/26/mac-os-x-snow-leopard-rails-mysql-and-sphinx/</link>
		<comments>http://blog.d27n.com/2009/08/26/mac-os-x-snow-leopard-rails-mysql-and-sphinx/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 18:21:46 +0000</pubDate>
		<dc:creator>schmeeve</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[rmagick]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[snow leopard]]></category>
		<category><![CDATA[sphinx]]></category>
		<category><![CDATA[ultrasphinx]]></category>

		<guid isPermaLink="false">http://blog.d27n.com/?p=14</guid>
		<description><![CDATA[
			
		
Ah, Snow Leopard. While you&#8217;re admiring the photoshop job Apple did to the box art, you may be eager to install the new Leopard, but hang on if you&#8217;re using Rails.
If you&#8217;re getting the following types of error with the mysql driver, you may need to reinstall.
The error:
!!! The bundled mysql.rb driver has been removed [...]]]></description>
			<content:encoded><![CDATA[<div class="fblikebutton_button" style="float: right; margin-left: 10px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.d27n.com%2F2009%2F08%2F26%2Fmac-os-x-snow-leopard-rails-mysql-and-sphinx%2F&amp;layout=standard&amp;show-faces=false&amp;width=450&amp;action=recommend&amp;colorscheme=dark" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:26px"></iframe>
		</div>
<p>Ah, <a href="http://www.amazon.com/gp/product/B001AMHWP8?ie=UTF8&amp;tag=d27ncom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B001AMHWP8" target="_blank">Snow Leopard</a>. While you&#8217;re admiring the <a href="http://gizmodo.com/5344970/original-snow-leopard-was-too-blood-thirsty-for-mac-os-x-box">photoshop job</a> Apple did to the box art, you may be eager to install the new Leopard, but hang on if you&#8217;re using Rails.</p>
<p>If you&#8217;re getting the following types of error with the mysql driver, you may need to reinstall.</p>
<h2>The error:</h2>
<blockquote><p><code>!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.<br />
rake aborted!<br />
dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): no suitable image found.  Did find:<br />
/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle: mach-o, but wrong architecture - /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle<br />
</code></p></blockquote>
<p>The fix:</p>
<blockquote><p><strong>
<pre>sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config</pre>
<p></strong></p></blockquote>
<p>(h/t <a href="http://stackoverflow.com/questions/991708/rails-mysql-and-snow-leopard" target="_blank">here</a>)</p>
<h2>Sphinx/Ultrasphinx:</h2>
<p>If sphinx is already installed (and searchd starts up without issue), you may be set. However, if you&#8217;re installing it new, you&#8217;ll want to compile it in 32-bit mode:</p>
<p>Download the latest tarball of Sphinx <a href="http://www.sphinxsearch.com/downloads.html" target="_blank">here</a>.</p>
<blockquote>
<pre><strong>./configure CFLAGS="-O -arch i386" CXXFLAGS="-O -arch i386" LDFLAGS="-arch i386" --disable-dependency-tracking
make
make install</strong></pre>
</blockquote>
<h2>RMagick:</h2>
<p>NOTE: Despite trying <a href="http://www.agileanimal.com/2009/08/11/imagemagick-and-rmagick-on-leopard-and-other-large-white-cats" target="_blank">this</a>, I still am having issues with RMagick. If anyone&#8217;s got tips&#8230;</p>
<p><strong>UPDATE:</strong> As per Dimitri&#8217;s (big hat tip!) post below, I *finally* got everything going using MacPorts, which I hadn&#8217;t realized was updated for Snow Leopard yet.</p>
<p>Didn&#8217;t go so smoothly, but finally succeeded. Just threw in the towel and got my old MacPorts install out of the way and started over.</p>
<p>To uninstall MacPorts completely (<strong>big caveat: this will uninstall everything previously installed with MacPorts</strong>):</p>
<blockquote><pre>sudo port -f uninstall installed

sudo rm -rf /opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg \
~/.macports</pre>
</blockquote>
<p>Then installed libxml2 and ImageMagick as Dimitri recommends, followed by:</p>
<blockquote><pre>sudo port install rb-rubygems
sudo gem install rmagick
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.d27n.com/2009/08/26/mac-os-x-snow-leopard-rails-mysql-and-sphinx/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
