MySQL 5.5.8 与 Snow Leopard 和 mysql2 gem 问题
我已经成功安装了MySQL 5.5.8和mysql2 gem 0.2.6。 但是当我执行 rake db:create 时 它告诉我:
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: Incompatible library version: mysql2.bundle requires version 17.0.0 or later, but libmysqlclient.16.dylib provides version 16.0.0 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle /Users/vvdpzz/mayday/Rakefile:4 (See full trace by running task with --trace)
我应该做什么? 如何解决这个问题?
I have installed MySQL 5.5.8 successfully and mysql2 gem 0.2.6.
but when I execute rake db:create
It tell me:
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: Incompatible library version: mysql2.bundle requires version 17.0.0 or later, but libmysqlclient.16.dylib provides version 16.0.0 - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle /Users/vvdpzz/mayday/Rakefile:4 (See full trace by running task with --trace)
What should I do?
How to fix that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试这样:
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/.rvm/gems/ruby-1.8.7/gems/mysql2-0.2.6/lib/mysql2/mysql2。捆
try like this:
sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/.rvm/gems/ruby-1.8.7/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
rails服务器无法使用rvm & 启动mysql2 OSX 10.6.5 上的 ruby 1.9.2-p0
rails server fails to start with mysql2 using rvm & ruby 1.9.2-p0 on OSX 10.6.5