Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- su - postgres
- create role <your_username> with createdb login password <your_password>
- The above won't work due to root being disabled by default in Ubuntu. You'll have to set up root, or do the following
- $ sudo -i -u postgres psql
- postgres=# CREATE ROLE name_tealeaf WITH CREATEDB LOGIN PASSWORD 'password';
- ---
- config/database.yml
- development:
- adapter: postgresql
- encoding: unicode
- database: myapp_dev
- pool: 5
- username: <your_username>
- password: <your_password>
- test:
- adapter: postgresql
- encoding: unicode
- database: myapp_test
- pool: 5
- username: <your_username>
- password: <your_password>
- The above will cause a FATAL: Peer authentication error whenever you run bundle exec rake db:create:all. You need to add the host, see below
- development:
- adapter: postgresql
- encoding: unicode
- database: myapp_dev
- host: localhost
- pool: 5
- username: <your_username>
- password: <your_password>
- test:
- adapter: postgresql
- encoding: unicode
- database: myapp_test
- host: localhost
- pool: 5
- username: <your_username>
- password: <your_password>
Add Comment
Please, Sign In to add comment