问题描述
sdilshod@sdilshod-Lenovo-B590:~/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?任何帮助
heroku pg:psql works fine, but when i do migrate rake db:migrate it get error that needs to install pg client. Where i need to install pg client? Any help
推荐答案
在基于Debian的系统上,PostreSQL客户端程序由 postgresql-client-common 提供>作为指向 / usr / share / postgresql-common / pg_wrapper
的符号链接。
On a Debian based system the PostreSQL client programs are provided by postgresql-client-common as symbolic links to /usr/share/postgresql-common/pg_wrapper
.
如果安装该软件包并尝试使用任何PostgreSQL客户端程序,例如 psql , pg_dump , pg_dumpall 和 pg_restore , pg_wrapper ,而没有安装特定于版本的二进制软件包,例如 postgresql-client-9.1 将发出此错误:
If you install that package and attempt to use any of the PostgreSQL client programs like psql, pg_dump, pg_dumpall, and pg_restore, the pg_wrapper without having the version specific binary package installed, like postgresql-client-9.1 it will emit this error:
最简单的解决方法是安装 postgresql-client 元软件包。它始终取决于基于Debian的系统上当前支持的PostgreSQL数据库客户端软件包,并且取决于postgresql-client-common
The easiest way to fix this is to install the postgresql-client metapackage. It always depends on the currently supported database client package for PostgreSQL on Debian based systems and it depends on postgresql-client-common
sudo apt-get install postgresql-client
这篇关于出现错误:您必须安装至少一个postgresql-client-< version>。部署到heroku时打包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!