I am newbie with Rails and here is my problem.
I created a Rails by this command
rails new freelancer --database=postgreesql
And I had no error, everything seems ok. When I opened the file database.yml, here is what I got
default: &default
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: freelancer_development
test:
<<: *default
database: freelancer_test
production:
<<: *default
database: freelancer_production
username: freelancer
password: <%= ENV['FREELANCER_DATABASE_PASSWORD'] %>
So, I thought that I must set the User Password for thist PostgreSQL database. I search and found this link PostgreSQL: How to change PostgreSQL user password?, follow it and used this command
sudo -u freelancer psql freelancer_production
But it said to me that
sudo : unknown user : freelancer
sudo : unable to initialize policy plugin
I am very confusing with this problem because I defined freelancer above ? Could you please give me some ideas ? Thank you very much.