After installing the mysql gem, we were seeing
uninitialized constant MysqlCompat::MysqlRes errors
all over the place, although the gem installed fine.
This was on FreeBSD 8.1. Turns out Percona XtraDB binary doesn’t include the mysql client libs, so you need to install those as well. On FreeBSD just do
pkg_add -r mysql51-client
Then reinstall the gem:
env ARCHFLAGS="-arch x86_64" gem i mysql -- --with-mysql-config=/usr/local/percona-xtradb/bin/mysql_config