首先,我是一个总Rails/PostgreSQL noob。使用外部postgres数据库将轨道部署到Heroku
我想部署一个Rails应用程序Heroku。我已经完成并运行了,但每次部署时,Heroku会忽略我的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: sqlite3
pool: 5
timeout: 5000
development:
# <<: *default
# database: db/development.sqlite3
adapter: postgresql
pool: 5
host: wwydh.cqqq2sesxkkq.us-east-1.rds.amazonaws.com
timeout: 5000
username: wwydh_a_team
password: really cool password
database: wwydh
host: wwydh.cqqq2sesxkkq.us-east-1.rds.amazonaws.com
port: 5432
# 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
database: db/test.sqlite3
我在做什么错?
谢谢您的回答!当我运行第一个命令(使用和不使用大括号)时,我得到DATABASE_URL:postgress:// wwydh_a_team:[email protected]:5432/wwydh无效。必须采用FOO = bar格式。 –
更新,我改变了DATABASE_URL:postgres到DATABASE_URL = postgres并且运行了命令,但我得到了“无法覆盖附件值DATABASE_URL”。 –
对不起':'我更新了回答 –