This should sound like a very easy task, but it took me a while to sort this out, so I thought I'd share it. If you want to install the mysql gem with Ruby1.9 try this:
Liquid error: No such file or directory - posix_spawnp
Where in the --with-mysql-config option you have to specify the path to mysql_config in the bin directory in your mysql installation path.