If you are trying out the Rails 3 and you are stuck at not being able to install mysql2 gem on your windows pc. Just follow this steps to install it successfully (I used MySQL 5.5.9 version):
- Install MySQL 5.5.9
- Copy libmysql.dll from C:\Program Files (x86)\MySQL\MySQL Server 5.5\lib [Mine was 64 bit windows, in 32 bit it must be Program Files only] to bin directory of your Ruby installation
- Now open command prompt and run the following command: gem install mysql2 -- '--with-mysql-include="C:\Program Files (x86)\MySQL\MySQL Server 5.5\include" --with-mysql-lib="C:\Program Files (x86)\MySQL\MySQL Server 5.5\lib"'
Now its installed on windows...it was only about the extra config options and a bit of string escaping issue on windows command prompt...happy coding... :)