How to I resolve this Postgresql Invalid Paramater error?
I worked out how to get passed this issue:
This method in the postgresql_adapter.rb
file:
def set_standard_conforming_strings
old, self.client_min_messages = client_min_messages, 'panic'
execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil
ensure
self.client_min_messages = old
end
needs amending too:
def set_standard_conforming_strings
old, self.client_min_messages = client_min_messages, 'error'
execute('SET standard_conforming_strings = on', 'SCHEMA') rescue nil
ensure
self.client_min_messages = old
end
How to find:
gem info pg
cd
to location - for me this was:
cd /Users/williammurphy/.rvm/gems/ruby-2.2.4
then:
grep -ri 'panic' .
change anything that is set to 'panic' to 'error' instead and this should see you through.
Postgres error invalid value for parameter TimeZone: UTC
I had the same problem using the Postgres.app from Heroku. Rebooting my Mac solved it.
How does 'client_min_messages' setting affect an application using libpq?
Messages are sent as a different message type on the PostgreSQL protocol, usually interleaved with the result stream. libpq
sees them and picks them out, then adds them to a queue of notifications you can examine.
See the manual.
rake db:migrate failed
You need to first create the user kt1 , then create the database and give the user permission to it.
There is a way to let rails create the user and database, but in postgresql, it is best to do it by hand (IMHO)
Related Topics
How to Run Rake with --Trace Within Capistrano
You Don't Have Write Permissions into the /Var/Lib/Gems/1.9.1 Directory
Ruby Incorrectly Parses 2 Digit Year
Convert Ruby Source Code from Old Style to New Style Hash
Regex to Validate String Having Only Characters (Not Special Characters), Blank Spaces and Numbers
Ruby - Extracting the Unique Values Per Key from an Array of Hashes
Colorized Output Breaks Linewrapping with Readline
Script to Run Against Stdin If No Arg; Otherwise Input File =Argv[0]
How to Use Mongodb Ruby Driver to Do a "Group" (Group By)
How to Fix a Slow Implicit Query on Pg_Attribute Table in Rails
Rails Devise - Current_User Is Nil
Sort a List of Objects by Using Their Attributes in Ruby
Better Way to Write "Matching Balanced Parenthesis" Program in Ruby