问题描述
嗨我必须为我的 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 安装问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!