ruby mysql2 gem 安装问题 [英] ruby mysql2 gem installation issues

查看:44
本文介绍了ruby mysql2 gem 安装问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我必须为我的 ruby​​ 应用程序安装 mysql2 gem.但是,当我尝试使用gem install mysql2"安装 mysql2 gem 时,它显示错误封闭类/模块 'mMysql2' for class Client not known".我已经安装了mysql@/usr/bin 位置.我已经从路径/usr/bin 运行了gem install mysql2"命令,但它显示了同样的问题.由于这个问题,我无法使用它显示的命令rails g model contact"为 ruby​​ on rails 项目创建我的模型未安装 gem mysql2 的错误.我花了很长时间在谷歌上搜索跟踪这个问题,不幸的是没有论坛有正确的答案.请帮帮我

Hi i have to install mysql2 gem for my ruby application. But when i try to install mysql2 gem using "gem install mysql2" it shows an error "Enclosing class/module 'mMysql2' for class Client not known". I have already installed mysql @ /usr/bin location. I have run the "gem install mysql2" command from the path /usr/bin, but it shows the same issue.Because of this issues i cannot create my model for ruby on rails project using the command "rails g model contact" it show an error of gem mysql2 is not installed. i have spend long time for googling for tracking this issues, unfortunately no forum have the correct answer. Please help me

推荐答案

您可能需要系统的 libmysqlclient-dev 头文件.您使用的是哪种操作系统?

You will probably need the libmysqlclient-dev headers for your system. What kind of OS are you using?

这篇关于ruby mysql2 gem 安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆