<?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>Sean&#039;s Blog &#187; adapter</title>
	<atom:link href="http://seanbehan.com/tag/adapter/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fixing MySQL for Rails 2.2 Development on Mac OS X</title>
		<link>http://seanbehan.com/programming/fixing-mysql-for-rails-2-2-development-on-mac-os-x/</link>
		<comments>http://seanbehan.com/programming/fixing-mysql-for-rails-2-2-development-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 16:35:50 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[adapter]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=421</guid>
		<description><![CDATA[Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version >= 2.2, no longer comes bundled with the MySQL adapter. This means you&#8217;ll need to install it yourself, but it appears that the gem for installing it is also broken. This will fail gem install mysql What you [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Ffixing-mysql-for-rails-2-2-development-on-mac-os-x%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Fixing MySQL for Rails 2.2 Development on Mac OS X" data-url="http://seanbehan.com/programming/fixing-mysql-for-rails-2-2-development-on-mac-os-x/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Oh what trouble Rails 2.2 and MySQL (on Mac OS X) can be. Rails, as of version >= 2.2, no longer comes bundled with the MySQL adapter. This means you&#8217;ll need to install it yourself, but it appears that the gem for installing it is also broken.</p>
<p>This will fail</p>
<pre class="wp-code-highlight prettyprint">
gem install mysql
</pre>
<p>What you need to do is tell the gem which MySQL to use. I installed MySQL with mac ports, http://macports.org , so I need to specify this when I run the installation command.</p>
<pre class="wp-code-highlight prettyprint">
gem install mysql -- --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config
</pre>
<p>Check out an earlier post explaining how to install MySQL with mac ports http://seanbehan.com/programming/installing-sphinx-search-engine-on-mac-os-x-or-ld-library-not-found-for-lmysqlclient/</p>
<p>You&#8217;re not out of the woods yet. Rails needs to know the location of the socket it uses to connect to the MySQL server. I created a symbolic link to the location Rails normally looks for this socket. You could specify the location of the socket in the config/database.yml file, however, then you&#8217;ll need to do this with each of your applications.</p>
<pre class="wp-code-highlight prettyprint">
ln -s /private/tmp/mysql.sock /opt/local/var/run/mysql5/mysqld.sock
</pre>
<p>If there is an easier way to get MySQL back for Rails on Mac OS X please let me know. I&#8217;d love a quick fix to this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/fixing-mysql-for-rails-2-2-development-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

