How to fix «NoMethodError: protected method `postgresql_version'»?

postgresql

(Dmitry Fedyuk) #1

rake aborted!
NoMethodError: protected method `postgresql_version' called for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x000055c530a71a98>
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:46:in `eval'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/seeder.rb:38:in `seed'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/active_record_extension.rb:32:in `seed'
(eval):1:in `block (2 levels) in run_file'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:46:in `eval'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:58:in `block in open'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:57:in `open'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:57:in `open'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:36:in `block in run_file'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-4.2.10/lib/active_record/transactions.rb:220:in `transaction'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:35:in `run_file'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:26:in `block in run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:25:in `each'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:25:in `run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/seed-fu-2.3.7/lib/seed-fu.rb:29:in `seed'
/mnt/hgfs/code/lib/tasks/db.rake:8:in `block in <main>'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
~/.rbenv/versions/2.4.2/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
~/.rbenv/versions/2.4.2/bin/rake:23:in `load'
~/.rbenv/versions/2.4.2/bin/rake:23:in `<top (required)>'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
~/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
~/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
~/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

(Dmitry Fedyuk) #2

The postgresql_version method was made public in Ruby on Rails v5.0.0.beta2:

The postgresql_version method was made public in rails/AR 5.0

github.com/mbleigh/seed-fu/issues/123#issuecomment-348193074


(Dmitry Fedyuk) #3

Discourse uses Ruby on Rails 5 since 2017-08-23: