Подтвердить что ты не робот

Get Error: вы должны установить хотя бы один пакет postgresql-client- <version> при развертывании на героку

[email protected]:~/webapp/saturn$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.6194
DEPRECATION WARNING: You have Rails 2.3-style plugins in    vendor/plugins! Support for these plugins will be removed in Rails 4.0.  Move them out and bundle them in your Gemfile, or fold them in to your app  as lib/myplugin/* and config/initializers/myplugin.rb. See the release  notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2- 0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in  vendor/plugins! Support for these plugins will be removed in Rails 4.0.   Move them out and bundle them in your Gemfile, or fold them in to your app   as lib/myplugin/* and config/initializers/myplugin.rb. See the release   notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-  0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
 Error: You must install at least one postgresql-client-<version> package.
 rake aborted!
 Error dumping database
 /app/vendor/bundle/ruby/1.9.1/gems/activerecord-   3.2.12/lib/active_record/railties/databases.rake:415:in `block (3 levels)   in <top (required)>'
 /app/vendor/bundle/ruby/1.9.1/gems/activerecord- 3.2.12/lib/active_record/railties/databases.rake:188:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:182:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:structure:dump
(See full trace by running task with --trace)

heroku pg: psql отлично работает, но когда я выполняю миграцию rake db: migrate, вы получите ошибку, которая должна установить pg client. Где мне нужно установить pg client? Любая помощь

4b9b3361

Ответ 1

В системе на базе Debian клиентские программы PostreSQL предоставляются postgresql-client-common как символические ссылки на /usr/share/postgresql-common/pg_wrapper.

Если вы установите этот пакет и попытаетесь использовать любые клиентские программы PostgreSQL, такие как psql, pg_dump, pg_dumpall и pg_restore, pg_wrapper без установленного бинарного пакета версии, например postgresql-client-9.1, это испустит эту ошибку:

Вы должны установить хотя бы один postgresql-client- < версия > пакет

Самый простой способ исправить это - установить метапакет postgresql-client. Это всегда зависит от поддерживаемого в настоящее время клиентского пакета базы данных для PostgreSQL в системах на базе Debian и зависит от postgresql-client-common

sudo apt-get install postgresql-client