我从一个demo中学习rails,原来database.yml
是
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
所以这个演示sqlite
用作数据库,但我想更改为mysql
,所以我更改database.yml
为:
adapter: mysql2
database: jobs_test
server: localhost
username: root
password: "1234"
pool: 5
timeout: 5000
encoding: utf8
当我跑步时
rake db:migrate
然后我得到了错误:
rake aborted!
Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter`
(sqlite3 is not part of the bundle. Add it to Gemfile.)
所以,我已经将适配器更改为mysql2
,为什么它让我安装sqlite3 adapter
?