Cannot install mysql2 gem

前端 未结 9 2358
死守一世寂寞
死守一世寂寞 2020-12-05 01:20

I\'m unable to install the mysql2 gem in my Windows7 x64 system. I tried using both the 32-bit and 64-bit versions of MySQL server but none got me any further.

I ins

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 01:37

    The accepted answer did not work for me, and neither did the the other 2. However, a comment by MG on the link from Ritesh did the trick for me. I had to specify version 0.2.6, and include the parameter --platform=ruby. (Note: I also had to download the "noinstall" version of MySQL to get the /lib/opt)

    Here is how I got the gem installed on Windows

    gem install mysql2 -v 0.2.6 -- --platform=ruby --with-mysql-lib=C:\Ruby192\MySQL\lib\opt --with-mysql-dir=C:\Ruby192\MySQL
    

提交回复
热议问题