我剛剛在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