Fedora Core 5 and the MySQL Extension for Ruby

Getting the MySQL extension for Ruby installed or updated on Fedora Core
5 takes a few extra steps besides “gem install mysql”. Since I can never
remember the steps needed to get the extension installed, I am posting
this install guide so I won’t have to search for it on Google. Who
knows, maybe somebody else will find it useful too.

  1. Run “gem install mysql”. Choose to install mysql 2.7, and wait for
    the install to die with an error.
  2. Change to the gem directory. “cd
  3. Configure the gem with the proper path to mysql_config. “ruby
    extconf.rb –with-mysql-config=/usr/bin/mysql_config”
  4. Run make.
  5. Optionally, you can run the test suite on module. “ruby ./test.rb
    [hostname]  [user]  [password] [dbname] [port] [socket] [flag]”
  6. Run make install.
  7. Run “gem install mysql” again to complete the installation.