有人可以帮我吗?设置本地 Rails 2.2.2 项目但 rake 失败。安装了 mysql gem:
像这样安装MySQL gem:
sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Successfully installed mysql-2.9.0
1 gem installed
Installing ri documentation for mysql-2.9.0...
Installing RDoc documentation for mysql-2.9.0...
然后尝试调用rake:
$ rake --trace db:migrate
** 调用 db:migrate (first_time)
** 调用环境 (first_time)
** 执行环境
** 执行 db:migrate
!!! 捆绑的 mysql.rb 驱动程序已从 Rails 2.2 中删除。
请安装 mysql gem 并重试:gem install mysql。
耙中止!dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.9.0/lib/mysql/mysql_api.bundle, 9):库未加载:libmysqlclient.18.dylib 引用自:/Library/Ruby/Gems/1.8 /gems/mysql-2.9.0/lib/mysql/mysql_api.bundle 原因:找不到图像 - /Library/Ruby/Gems/1.8/gems/mysql-2.9.0/lib/mysql/mysql_api.bundle