Unable to install MySQL2 gem on Windows 7

前端 未结 7 1273
醉话见心
醉话见心 2020-12-01 14:39

I am getting the following error message while installing, let me know if I need to post more details.

I followed instructions from the following location: https:/

7条回答
  •  Happy的楠姐
    2020-12-01 15:02

    I've tried the solution of @Mrk Fldig but it didn't work... So what solved the problem was:

    1. Downloaded the lastest MySQL Installer for windows 7 32 bits
    2. Installed the gem with the following command: gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:/Program Files/MySQL/MySQL Connector C 6.1 6.1.2/"'

    One pitfall to be aware of is that I changed the backslashes (\) to normal slashes (/). I've tried the same procedure with backslashes and it didn't work.

    The installer already includes the C connectors for MySQL at MySQL Connector C 6.1 6.1.2 directory. Therefore, passing only the --with-mysql-dir parameter without the --with-mysql-lib or --with-mysql-include parameters, makes the gem to look at the same directory for the lib and include directories

提交回复
热议问题