Is Datamapper's dm_mysql_adapter gem supported on windows?

后端 未结 2 1581
抹茶落季
抹茶落季 2021-01-16 07:35

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

相关标签:
2条回答
  • 2021-01-16 08:26

    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.

    0 讨论(0)
  • 2021-01-16 08:27

    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.

    0 讨论(0)
提交回复
热议问题