我在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
答案 0 :(得分:2)
使用gem install mysql2 -v 0.3.9
可以解决问题。