配置如下
default: &default
adapter: mysql2
encoding: utf8
reconnect: false
pool: 5
username: root
host: remote_ip
port: 3306
development:
<<: *default
database: test
# 本地数据库
test2:
adapter: mysql2
encoding: utf8
reconnect: false
database: test2
pool: 5
username: root
password:
- 创建数据库:rake db:create RAILS_ENV=market
- 表迁移:rake db:migrate SRCDIR=test2_db/migrate/ RAILS_ENV=test2
第二步出现以下问题,记得在 rails3 里面这样做是可以的
```
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:
- development - set it to false
- test - set it to false (unless you use a tool that preloads your test environment)
- production - set it to true
```