Last active
December 26, 2021 17:25
-
-
Save franzejr/11a136389c772f8452109dd5a92dfb9c to your computer and use it in GitHub Desktop.
Active Record 4.2.1 connection adapters - error: PG::InvalidParameterValue: ERROR: invalid value for parameter "client_min_messages": "panic" HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error. : SET client_min_messages TO 'panic'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /Users/franzejr/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/activerecord-4.2.1 | |
# Changes in activerecord (4.2.1) lib/active_record/connection_adapters/postgresql_adapter.rb | |
# Enable standard-conforming strings if available. | |
def set_standard_conforming_strings | |
old, self.client_min_messages = client_min_messages, 'notice' | |
execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil | |
ensure | |
self.client_min_messages = old | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another way is to install my fixed Rails 4.2.1 gem
gem 'rails', git: 'https://github.com/nrogap/rails.git', tag: 'v4.2.1.1'
https://nrogap.medium.com/old-rails-and-postgresql-12-problem-ba44388feb1d