【问题标题】:Windows 7 mysql2 gem errorWindows 7 mysql2 gem 错误
【发布时间】:2011-11-29 10:38:15
【问题描述】:

我在 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

【问题讨论】:

  • 尝试安装旧版本的 mysql2 gem。

标签: ruby-on-rails gem mysql2


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2011-08-09
    • 2014-04-16
    • 2013-10-01
    • 2011-07-19
    • 2011-09-16
    • 2012-12-21
    • 2011-08-12
    • 2011-04-09
    相关资源
    最近更新 更多