耙子和耙子的问题mysql2 宝石
这里是 Rails 新手。我正在使用 10.6.4 运行 Snow Leopard,其中包含有 Rails (3.0.7)、mysql2 (0.3.2) gem 和 mysql2 (0.3.2) gem。 mysql-5.5.12(64 位版本)。 我的问题是 rake 不会将 DB Schema 转储到我的 Rails 项目中。它给出的错误:
Homes-Mac-Pro:demo home$ rake db:schema:dump
(in /Users/home/Sites/demo)
rake aborted!
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
/Users/home/Sites/demo/Rakefile:4
可以在此处找到完整跟踪
这是我在堆栈溢出中的第一个rails问题。 谢谢
Newbie to rails here. I'm running Snow Leopard with 10.6.4 with rails (3.0.7), mysql2 (0.3.2) gem & mysql-5.5.12 (64 bit version).
My problem is that rake wont dump DB Schema into my rails project. The error it gives:
Homes-Mac-Pro:demo home$ rake db:schema:dump
(in /Users/home/Sites/demo)
rake aborted!
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.3.2/lib/mysql2/mysql2.bundle
/Users/home/Sites/demo/Rakefile:4
Full trace can be found here
This is my first rails question in Stack overflow.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个非常常见的问题。简单的解决方案是在 Gemfile 中执行以下操作。
博客文章
任何以上的其他版本不适用于 Rails 3.0.0 - 3.0.8
让我们知道您的进展情况。一切顺利。
This is a very common problem. The simple solution is to do the following in your Gemfile.
Blog Post
Any other versions above these dont work with Rails 3.0.0 - 3.0.8
Let us know how you get on. All the best.