我试图将我的rails项目数据库推送到heroku的数据库。
我输入此内容
ReadingList_development
(sh: psql: command not found
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: psql failed. exit status 32512, output: "" (RuntimeError)
Command: heroku pg:push ReadingList_development DATABASE_URL --app calm-eyrie-9110
Plugins: heroku-legacy-taps
Version: heroku-toolbelt/3.40.6 (x86_64-darwin10.8.0) ruby/1.9.3
Error ID: c131ced7e02d4080a3ff53e27d7bd983
More information in /Users/Coda/.heroku/error.log
是我的本地数据库名称。)
然而,它显示此错误
Heroku client internal error.
psql failed. exit status 32512, output: ""
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:783:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:108:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:53:in `ensure_remote_db_empty'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:23:in `prepare'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:14:in `execute'
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:371:in `push'
/Users/Coda/.heroku/client/lib/heroku/command.rb:212:in `run'
/Users/Coda/.heroku/client/lib/heroku/cli.rb:27:in `start'
/usr/bin/heroku:24:in `<main>'
Heroku client internal error.
psql failed. exit status 32512, output: ""
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:783:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:108:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:53:in `ensure_remote_db_empty'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:23:in `prepare'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:14:in `execute'
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:371:in `push'
/Users/Coda/.heroku/client/lib/heroku/command.rb:212:in `run'
/Users/Coda/.heroku/client/lib/heroku/cli.rb:27:in `start'
/usr/bin/heroku:24:in `<main>'
Heroku client internal error.
psql failed. exit status 32512, output: ""
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:783:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:108:in `exec_sql_on_uri'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:53:in `ensure_remote_db_empty'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:23:in `prepare'
/Users/Coda/.heroku/client/lib/heroku/helpers/pg_dump_restore.rb:14:in `execute'
/Users/Coda/.heroku/client/lib/heroku/command/pg.rb:371:in `push'
/Users/Coda/.heroku/client/lib/heroku/command.rb:212:in `run'
/Users/Coda/.heroku/client/lib/heroku/cli.rb:27:in `start'
/usr/bin/heroku:24:in `<main>`
这是 error.log
heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app sushi
syndax应该像
mylocaldb
我不确定HEROKU_POSTGRESQL_MAGENTA
和heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app calm-eyrie-9110
应该是什么。当我输入这个
Unknown database: HEROKU_POSTGRESQL_MAGENTA. Valid options are: DATABASE_URL
它返回
mylocaldb
database.yaml
中的database.yaml
是否应该是同一个名称?
这是我的default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
database: ReadingList_development
信息
heroku config:get -a calm-eyrie-9110
此外,我输入! Usage: heroku config:get KEY
! Must specify KEY.
它返回
{{1}}