Rails3 + mysql2 gem,我收到 LibMYSQL.dll 未找到错误
好的,当我运行“rake db:create:all”时,我收到“libMYSQL.dll not found..”错误。我在旧版本的 Rails 中遇到了同样的问题,但很容易修复,只需将 libmysql.dll 复制到 ruby/bin 即可。
好吧,在 Rails 3 中我尝试了同样的事情,但它不起作用。
有人有解决办法吗?
Ruby on Rails 3.0.3 mysql2 0.2.6 红宝石 1.9.2
谢谢!
Ok so when I'm running "rake db:create:all" I get this "libMYSQL.dll not found.." error. I had the same problem with older version of rails but it was easy to fix, just copy libmysql.dll to ruby/bin.
Well, with Rails 3 I tryed the same thing but it doesn't work.
Anyone with a solution?
Ruby on Rails 3.0.3
mysql2 0.2.6
Ruby 1.9.2
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它应该有效。
我自己已经成功了;需要注意的是,您需要拥有与服务器运行时相同版本的 MySQL 中的 libmysql.dll 版本(否则您将收到随机错误,这将花费您很长时间才能弄清楚)。
我知道这不是一个很有帮助的答案。您确定已将正确的文件复制到正确的文件夹中吗?
It should work.
I've gotten this working myself; with the caveat that you need to have the version of libmysql.dll from the same version of MySQL as your server is running (otherwise you'll get random errors which will take you ages to figure out).
I know this isn't a terribly helpful answer. Are you sure that you've definitely copied the right file into the right folder?
已解决,但可能对其他人有帮助:
在此处查找您的 libmysql 版本。下载 .zip 并将 de libmysql.dll 从 lib 复制到您的 ruby/bin
It's solved, but it may help others:
Look for your version of libmysql arround here. Download the .zip and copy de libmysql.dll from lib to your ruby/bin