moved a rails app of mine onto a new server and had to install a few gem dependencies. However, after installing the mysql gem I get the error, uninitialized constant Mysql
My problem was due to my "mysql" being a 32-bit installation while ruby was 64 and 32-bit. Check with these commands
file `which mysql`
file `which ruby`
Both should match Mach-O 64-bit executable x86_64 or Mach-O 64-bit executable i386. I installed a 64-bit mysql, then
export ARCHFLAGS="-arch x86_64" ; sudo gem install --no-rdoc --no-ri mysql -v 2.7 -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config
and voila!