【发布时间】:2011-08-20 07:46:04
【问题描述】:
我在这里阅读了许多关于 mysql2 的帖子,但尽管 gem 似乎安装得很好,但在运行任何 rake db 任务或 rails 命令时仍然会出错。在我的 Gemfile 中:
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'mysql2'
在我的远程服务器上,我运行了以下命令:
$ bundle install
...
Using mysql2 (0.2.7)
...
Using rails (3.0.7)
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
$ rake db:schema:load
(in ...)
rake aborted!
Please install the myslq2 adapter: `gem install activerecord-myslq2-adapter` (no such file to load -- active_record/connection_adapters/myslq2_adapter)
$ gem install activerecord-myslq2-adapter
ERROR: Could not find a valid gem 'activerecord-myslq2-adapter' (>= 0) in any repository
$ gem install mysql2
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.2
1 gem installed
Installing ri documentation for mysql2-0.3.2...
Enclosing class/module 'mMysql2' for class Result not known
Installing RDoc documentation for mysql2-0.3.2...
Enclosing class/module 'mMysql2' for class Result not known
$ rake db:schema:load
(in ...)
rake aborted!
Please install the myslq2 adapter: `gem install activerecord-myslq2-adapter` (no such file to load -- active_record/connection_adapters/myslq2_adapter)
我还有什么遗漏的吗?谢谢。
【问题讨论】:
标签: ruby-on-rails mysql2