I am wanting to play some more with Ruby and currently seem to have a grasp of sinatra, but would also like to now pull in data from a relational database. I tend to use Mys
DataMapper and DataObjects (the lower layer that connects to the DB) do works on Windows.
However, seems that do_mysql 0.10.7 is missing the precompiled binary for x86-mingw32
platform:
http://rubygems.org/gems/do_mysql/versions
You can compile do_mysql yourself using MySQL Connector/C interface, which is independent of the version of MySQL you have installed in your computer.
Please take a look to this blog post which provides installation instructions:
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
The instructions are for mysql
gem, but changing it to do_mysql
should work (except for the example code which is MySQL specific.
Hope that helps.
to delinkify Luis' answer, it looks something like this:
gem install do_mysql --platform=ruby -- --with-mysql-dir="C:/PROGRA~1/MySQL/MYSQLS~1.7/"
where the "mysql-dir" path is the short version of the "MySQL Server 5.7" directory in "C:\Program Files" on a x64 system.