我想在Heroku上的ROR上卸载我的应用程序。我在Heroku上卸载了我的应用程序,但是我没有数据库。我应该做什么,我的数据库在Heroku上卸载。我收到很多错误。其中一个错误是brlow引入的。现在我的网站工作,但我没有数据库。我读了Heroku Dev ...对不起,我无法卸载数据库。有什么错误?你能帮助我吗?请说出我应该完成的命令,即我的数据库可以在Heroku上运行。
我的错误:
ark@ark-Aspire-5750G:~/appq$ heroku db:pull
Loaded Taps v0.3.24
Auto-detected local database: postgres://postgres:ippolit@localhost/Mirp?encoding=utf8
Warning: Data in the database 'postgres://postgres:ippolit@localhost/Mirp?encoding=utf8' will be overwritten and will not be recoverable.
! WARNING: Destructive Action
! This command will affect the app: mighty-oasis-6099
! To proceed, type "mighty-oasis-6099" or re-run this command with --confirm mighty-oasis-6099
的database.yml
development:
adapter: postgresql
database: Mirp
host: localhost
username: postgres
password: ippolit
encoding: utf8
# 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:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: postgresql
database: production_db
pool: 5
timeout: 5000
答案 0 :(得分:0)
首先,您应该使用已被弃用的heroku pg:pull
代替heroku db:pull
。
下载(拉动)数据库时收到的错误是因为您的本地postgres实例中已有一个具有该名称的现有数据库。您可以通过键入mighty-oasis-6099
覆盖该数据库的内容,或将内容拉入本地开发人员的新数据库中:
heroku pg:pull Mirp_new --app mighty-oasis-6099
有关更多选项,请参阅https://devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull