什么是“连接到由database.yml指定的数据库”在日志文件中的意思是什么? [英] what does "Connecting to database specified by database.yml" in the log file mean?

查看:318
本文介绍了什么是“连接到由database.yml指定的数据库”在日志文件中的意思是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个Rails 3.2.9应用程序,执行某个动作,应用程序不进一步,当我咀嚼日志文件,我得到这一行是日志中的最后一个

I'm working on a Rails 3.2.9 app , on performing a certain action, the app doesnt go any further and when i chech the log file i get this line to be the last in the log

Connecting to database specified by database.yml


b $ b

我不知道是什么导致这个问题..当我注册或登录也需要连接到db和它工作正常..然后..只有当一个函数(称为执行测试用例)被点击,该应用程序不会进一步和冻结本身。

I have no idea what's causing this problem.. When i sign up or sign in also it needs to connect to db and it works fine then.. only when a function (called execute test case) is clicked, the app doesnt go further and freezes there itself..

请帮助我,如果你遇到这个...或建议什么可能是原因!!

Please help me if you have come across this ...or suggest what may be the cause!!

推荐答案

我发现了这个错误的原因。问题是当为应用程序安装 gem'mysql2'不是与安装在我们的机器上的MySQL服务器版本兼容的。还有一个相应的libmysql.dll文件要复制到Ruby文件夹。
因此,通过指定Mysql的本地目录安装gem

I found the cause of this error.. Problem is when the gem ‘mysql2’ is installed for the app , it might not be the one compatible with the version of MySQL server that is installed in our machine. And also a corresponding libmysql.dll file to be copied to Ruby folder. So install the gem by specifying the local directory of Mysql

1.在cmd中,

gem install mysql2 -- --with-mysql-dir=C:\Program Files\MySQL




  1. 按照cmd中的说明,按照链接下载dll。从该位置提取zip并按照cmd中的说明复制该文件

如果zip为空或链接显示文件不存在。 (确实会发生在一些版本!!)

If the zip is empty or the link shows file not exist.(which does happen for some versions!!)

- >转到链接,并按照流程在url ..喜欢的网站.. http://dev.mysql.com - >下载 - > MySQL连接器 - > MySQL连接器/ C - >最新版本的zip是显示..选择一个具有确切的文件名,在空的zip /破碎的链接。如果不是点击之前的GA版本,并找到相应的zip文件。下载,解压缩libmysql.dll并将其复制到Ruby的bin文件夹

--> Go to the link and follow the flow in the url.. Like the website.. http://dev.mysql.com ->downloads -> MySQL Connectors -> MySQL Connector/C -> the latest version zips are displayed.. Choose the one with the exact file name as in the empty zip/broken link. If not click on previous GA versions and find the according zip file. Download, extract and copy the libmysql.dll to Ruby’s bin folder

这篇关于什么是“连接到由database.yml指定的数据库”在日志文件中的意思是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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