[英]Errors with gem install mysql2
Hello i am having trouble installing mysql2 gem. 您好,我无法安装mysql2 gem。 The first error i was getting was mysql client is missing.
我遇到的第一个错误是mysql客户端丢失。 I have fixed this with the following
我已通过以下方式修复此问题
gem install mysql2 -- '--with-mysql-dir="C:\Program Files\MySQL\MySQL Server 5.7"'
I then get the message that is missing mysql.h 然后我得到缺少mysql.h的消息
gem install mysql2 -- '--with-mysql-dir="C:\Program Files\MySQL\MySQL Server 5.7" --with-mysql-config="C:\Program Files\MySQL\MySQL Server 5.7\bin"'
I have tried \\bin and \\include \\lib. 我尝试了\\ bin和\\ include \\ lib。 i have tried different permutation of the last with-mysql to try and find the mysql.h and have been unsuccessful.
我尝试了最后一个with-mysql的不同排列,以尝试找到mysql.h,但未成功。
Any help will be greatly appreciated. 任何帮助将不胜感激。
Thanks. 谢谢。
Not sure if this info is needed but just in case. 不知道是否需要此信息,以防万一。
Gem --v is 2.2.3 宝石--v是2.2.3
Rails -v is 4.2.5 Rails -v是4.2.5
Ruby -v is 2.1.5p273 [i386-mingw32] Ruby -v是2.1.5p273 [i386-mingw32]
MySQL server version 5.7.9 MySQL服务器版本5.7.9
使用这个版本
gem 'mysql2', '~> 0.3.19'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.