windows 设置 rails 查找 LIBMYSQL.dll 的默认位置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8162322/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Set up rails to find the default location of LIBMYSQL.dll
提问by Razor Storm
I am on windows 7 and set up mysql through XAMPP.
我在 Windows 7 上并通过 XAMPP 设置 mysql。
I am now starting a new rails project (my first time developing in rails), and just set up the project.
我现在开始一个新的 rails 项目(我第一次在 rails 中开发),并且刚刚建立了这个项目。
I wanted to start the server so I used rails server
. However it is complaining that
我想启动服务器,所以我使用了rails server
. 然而,它抱怨说
"The program can't start because LIBMYSQL.dll is missing from your computer"
“程序无法启动,因为您的计算机缺少 LIBMYSQL.dll”
I know where libmysql.dll is stored at, so how do I tell rails to look there?
我知道 libmysql.dll 的存储位置,那么我该如何告诉 rails 去那里查看呢?
回答by
Libmysql.dllfile is located in the bin directory of your mysql installation.
Libmysql.dll文件位于 mysql 安装的 bin 目录中。
There also needs to be a copy of it in the Ruby\bindirectory.
Ruby\bin目录中还需要有一份它的副本。
Copy it there and restart your server or console, if you are already run it.
将它复制到那里并重新启动您的服务器或控制台(如果您已经在运行它)。