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客户端.我需要在哪里安装pg客户端?任何帮助
4条答案
按热度按时间g52tjvyc1#
在基于Debian的系统上,PostreSQL客户端程序由postgresql-client-common提供,作为
/usr/share/postgresql-common/pg_wrapper
的符号链接。如果您安装该软件包并尝试使用任何PostgreSQL客户端程序(如psql、pg_dump、pg_dumpall和pg_restore),则在未安装版本特定二进制软件包(如postgresql-client-9.1)的情况下,pg_wrapper将发出以下错误:
您必须至少安装一个postgresql-client-< version >package
最简单的解决方法是安装postgresql-client元包。它总是依赖于基于Debian的系统上当前支持的PostgreSQL数据库客户端包,并且它依赖于postgresql-client-common
roejwanj2#
更新日期:2020年3月30日
同意选择的答案,但我发现在Ubuntu 18上安装postgresql-client-12稍微复杂一些。
有关详细信息,请参阅this reference。
um6iljoc3#
对于Ubuntu 18.04.6 LTS,它只使用两个命令;
和
wpcxdonn4#
使用新版本postgresql 14,我跟踪了此文档
http://apt.postgresql.org/pub/repos/apt/README