Windows 7 mysql2 gem 错误
我在 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 gem install mysql2 -v 0.3.9 可以解决这个问题。
Using
gem install mysql2 -v 0.3.9
could do the trick.