【发布时间】:2014-07-29 19:47:21
【问题描述】:
我在 ROR 应用中有数据库。我应该执行哪些命令才能使我的数据库正常工作?我还在 Heroku 上上传了我的应用程序。但我想拥有数据库。 (postgresql)
development:
adapter: postgresql
database: Nature
host: localhost
username: postgres
password: -----
encoding: utf8
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
【问题讨论】:
-
对于初学者,您的生产数据库不能是
sqlite,除非您的问题非常模糊。试试here -
Heroku 在devcenter.heroku.com/articles/… 上解释得很好。我会建议你的本地开发人员使用 postgres 而不是 sqlite3
标签: ruby-on-rails