gpt4 book ai didi

mysql - 在 64 位 ruby​​ 和 64 位 Windows 上安装 ruby​​ on Rails 的 mysql2 扩展

转载 作者:行者123 更新时间:2023-11-29 12:52:41 24 4
gpt4 key购买 nike

我已经从 http://rubyinstaller.org/downloads/ 安装了 64 位版本的 ruby

尝试安装mysql,我下载了64位版本的连接器

我收到错误

compiling client.c
In file included from client.c:1:0:
./mysql2_ext.h:17:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [client.o] Error 1

正如您在下一个屏幕中看到的

enter image description here

最佳答案

最后this faq工作了。我想是因为我下载了exactly the version of the connector linked在文章中并运行

gem install mysql2 --no-ri --no-rdoc --platform=ruby -- --with-mysql-include=C:/mysql-connector-c-noinstall-6.0.2-winx64\include --with-mysql-lib=C:/mysql-connector-c-noinstall-6.0.2-winx64\lib

编辑 - 64 位版本连接器使用的正确版本是 found here 。普通版本存在段错误,所以多亏了这个线程,我找到了正确的版本 https://github.com/brianmario/mysql2/issues/372

关于mysql - 在 64 位 ruby​​ 和 64 位 Windows 上安装 ruby​​ on Rails 的 mysql2 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24492494/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com