Over the last few days, and for no reason that I could identify, Rails started throwing numerous connection errors (on Mac OS X). This was quite frustrating, since I could not identify anything that had changed. Nevertheless, I opted to try to upgrade the Mysql driver to see if that would do the trick ( it had in the past).
The first thing I did was upgrade Mysql to 5.0.41 from 5.0.14 or so. Easy peasy. Next, I upgraded the sql driver -
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
After much googling, and not a little telling the ether what I thought of the whole matter, I found a solution:
sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
After this, no problems - and most importantly, the intermittent connection errors have stopped.