`
jsntghf
  • 浏览: 2476528 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

rails3中mysql2的安装

阅读更多

rails3中默认的mysql适配器是mysql2,执行以下命令进行安装:

 

gem install mysql2

 

结果报出以下错误信息:

 

ERROR:  Error installing mysql2:
        The 'mysql2' native gem requires installed build tools.

 

Please update your PATH to include build tools or download the DevK
from 'http://rubyinstaller.org/downloads' and follow the instructio
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

 

最终,通过以下命令成功安装:

 

gem install mysql2 -v 0.2.6 --platform x86-mingw32

 

注意:如果rails版本<3.1.0,就安装mysql 0.2.6,如果rails版本是3.1.*,才需要安装mysql 0.3.*。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics