ruby on rails - Error dumping database with 2 postgres servers -


i have installed 2 postgres servers on ubuntu version: 9.3.6; version: 9.2.6. how can define pg_dump version use in rails.

  $ rake db:migrate   pg_dump: server version: 9.3.6; pg_dump version: 9.2.6   pg_dump: aborting because of server version mismatch   rake aborted!   error dumping database   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/gems/activerecord-4.1.0/lib/active_record/tasks/postgresql_database_tasks.rb:55:in `struct>   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/gems/activerecord-4.1.0/lib/active_record/tasks/database_tasks.rb:150:in `structure_dump'   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/gems/activerecord-4.1.0/lib/active_record/railties/databases.rake:269:in `block (3 levels)>   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/gems/activerecord-4.1.0/lib/active_record/railties/databases.rake:43:in `block (2 levels) >   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/gems/activerecord-4.1.0/lib/active_record/railties/databases.rake:37:in `block (2 levels) >   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/bin/ruby_executable_hooks:15:in `eval'   /home/pair/.rvm/gems/ruby-2.0.0-p481@uptick/bin/ruby_executable_hooks:15:in `<main>'   tasks: top => db:structure:dump   (see full trace running task --trace) 

database config:

development:   adapter: postgresql   encoding: unicode   database: tradeapp_development   pool: 5   username: postgres9_3   password: postgres9_3   host: localhost   port: 5434 

my solution: define path variable before migration required postgres bin dir

export path="/usr/lib/postgresql/9.3/bin/:$path" rake db:migrate 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -