我刚刚在rails应用上创建了我的第一个ruby,并且想将我的数据库更改为postgresql以便与heroku一起使用它。到目前为止,我已经完成了这项工作,但我认为它不能正常工作。如果您发现任何问题,请告诉我吗?由于正在为postgresql更改database.yml
的database.yml:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: postgresql
database: myrubyblog
user: myrubyblog
password:
pool: 5
timeout: 5000
development:
<<: *default
adapter: postgresql
database: myrubyblog
user: myrubyblog
password:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
adapter: postgresql
database: myrubyblog
user: myrubyblog
password:
production:
<<: *default
adapter: postgresql
database: myrubyblog
user: myrubyblog
password:
我也改变了创业板的sqlite3'到宝石 'PG' 中的Gemfile
这可能帮助,如果你能在扩大“但我认为这是不正常” ... – 2015-04-05 15:41:28