`
samwalt
  • 浏览: 281047 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Windows 7上安装gem mysql2

    博客分类:
  • ruby
 
阅读更多
直接命令安装会失败
gem install mysql2

按照给出的提示

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


继续安装,仍然失败,还需要mysql-connector(需要头文件和库文件)。
下载了mysql-connector-c-6.1.2-winx64

gem install mysql2 --platform=ruby -- '--with-mysql-lib="F:\mysql-connector-c-6.1.2-winx64\lib" --with-mysql-include="F:\mysql-connector-c-6.1.2-winx64\include"' 


安装成功

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics