Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FATAL: role "postgres" does not exist
- createuser -s -r postgres
- Ex: createuser -s -U $USER
- enter your required role name: postgres
- enter password for your the user:
- psql -U 'your_database_name'
- $ sudo su
- # su postgres
- # createuser -s --username=postgres MYUSERNAME
- sovanlandy=# CREATE ROLE postgres LOGIN;
- sovanlandy=# ALTER ROLE postgres LOGIN;
- $createdb myapp_development
- default: &default
- adapter: postgresql
- encoding: unicode
- pool: 5
- host: <%= ENV.fetch("DATABASE_HOST") %>
- password: <%= ENV.fetch("DATABASE_PASSWORD") %>
- port: 5432
- development:
- <<: *default
- database: exactpos_development
- test:
- <<: *default
- database: exactpos_test
- production:
- <<: *default
- database: exactpos_production
- host: <%= ENV.fetch("DATABASE_HOST") %>
- username: <%= ENV.fetch("DATABASE_USER") %>
Add Comment
Please, Sign In to add comment