Hi all~~ I'm only 3 month into the coding scene, so forgive my ignorance.
Environment: ruby 2.3.3/rails 5.1/PG9.6.1 installed through homebrew on Mac OSX
My Goal: Trying to build a production ready rails app using Latest postgresql
Problem: as soon as I deployed my rails project and start testing my local server, I ran into "PG::ConnectionBad"/"fe_sendauth: no password supplied"/ @connection = PGconn.connect(@connection_parameters) . error
What I trying to do: I learned I need to config my pg_hba.conf file to set one of the encrypt method to MD5. via suggestion here
Rails + Postgres fe_sendauth: no password supplied
Progress: I was able to locate pg_hba.conf's directory by type in "locate pg_hba.conf"
It's in /Users/mypcname/PostgreSQL/pg96/init/pg_hba.conf
But now I can't find a way to execute the file to do the editing
Usually type in file's extension would let me exceute the file, but in this cause, it says someone about "superuser session", so I tried sudo su /Users/mypcname/PostgreSQL/pg96/init/pg_hba.conf
And got this
su: unknown login: /Users/mypcname/PostgreSQL/pg96/init/pg_hba.conf
So this is where I got stuck, any help and suggestion would be greatly appreciated, thanks in advance