Windows 7 mysql2 gem 错误

发布于 2024-12-18 08:11:08 字数 563 浏览 6 评论 0原文

我在 Windows 7 上运行 Rails。 所以我最初收到一个错误:

 ERROR: Failed to build gem native extension

C:/Ruby192/bin/ruby.exe extconf.rb

checking for rb_thread_blocking_region()... yes
checking for main() in -llibmysql... no
***extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers

然后我浏览了 stackoverflow 并发现要解决这个问题我需要做 gem install mysql2。我这样做了,但现在收到此错误:

gem install mysql2

ERROR: while executing gem... (NameError)
uinitialized constant Psyck::Syck

I am running rails on Windows 7.
So I originally got an error that said:

 ERROR: Failed to build gem native extension

C:/Ruby192/bin/ruby.exe extconf.rb

checking for rb_thread_blocking_region()... yes
checking for main() in -llibmysql... no
***extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers

I then went through stackoverflow and saw that to fix this I need to just do gem install mysql2. I did that but get this error now:

gem install mysql2

ERROR: while executing gem... (NameError)
uinitialized constant Psyck::Syck

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

完美的未来在梦里 2024-12-25 08:11:08

使用 gem install mysql2 -v 0.3.9 可以解决这个问题。

Using gem install mysql2 -v 0.3.9 could do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文