创建rails new app时无法安装mysql2

时间:2013-07-29 10:59:08

标签: mysql makefile

在使用mysql作为数据库创建rails app时,我收到以下错误

...
...
Installing mysql2(0.3.13)
Gem:Installer::ExtensionBuilderError: ERROR: Failed to build gem native extension
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region
checking for rb_wait_for_single_fd<>... yes
checking for rb_has_dup<>... yes
checking for rb_intern3<>... yes
***extconf.rb failed ***
Could not create Makefile due to some reasons, probably lack of necessary libraries and/or headers. Check the mkmf.log for more details. You may need configuration options

但是,如果我使用默认的sqlite数据库,则没有问题

My OS & MySQL information
OS:Winodows 8 64bit
MySQL: 5.6(64 bit)

1 个答案:

答案 0 :(得分:0)

不幸的是mysql2 gem有问题,你现在必须安装mysql gem,在你的config / database.yml和gemfile中从mysql2 / sqlite修改mysql之后做一个bundle install,希望那清楚。 / p>