While trying to install the MySQL gem in a Mac OS Lion, you might get an error message:
$ sudo gem install mysql -v '2.8.1'
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
....
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I then decided to install a MySQL developer package, but before that I installed MacPorts. Two very simple steps:
$ sudo port install mysql5-devel
Now install the MySQL Gem.
sudo gem install mysql -v '2.8.1'