Compiling mysql gem for mysql 5.1

The installing run on rails section assumes you do not have mysql installed and has you install the 5.0 version. If you already have mysql installed and it is the 5.1 or later version, you will need to compile the mysql gem to work with it. Follow the steps below:

1. Install the ruby devkit, see “Installing ruby on rails”
2. Make sure you uninstall any previous versions of the mysql gem, run from command line: gem uninstall mysql
3. Create a folder in C:\mysql51
4. Copy the ‘include’ and ‘opt’ folder from your MySQL 5.1 installation.
No ‘include’ or ‘opt’? Make sure you selected the ‘Complete’ installation when installing MySQL 5.1
4. Open the cmd window
5. Type: gem install mysql –platform ruby — –with-mysql-include=C:\mysql51\include –with-mysql-lib=c:\mysql51\lib\opt

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS