当我运行 rake db:create 时出现以下错误
xyz-MacBook-Pro:ruby_project xyz$ rake db:create
rake aborted!
dlopen(/Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/xyz/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle
我的系统中安装了 mysql 5.1.66,并且我的 database.yml 文件结构是
adapter: mysql2
encoding: utf8
reconnect: false
database: ruby_test
pool: 5
username: root
password:
host: /tmp/mysql.sock
以下是我系统中mysql文件夹的内容
libdbug.a libmysqlclient_r.a
libheap.a libmysqlclient_r.dylib
libmygcc.a libmysqlclient_r.la
libmyisam.a libmysqld.a
libmyisammrg.a libmystrings.a
libmysqlclient.16.dylib libmysys.a
libmysqlclient.a libvio.a
libmysqlclient.dylib libz.a
libmysqlclient.la libz.la
libmysqlclient_r.16.dylib plugin
有人可以帮我解决这个问题吗?