Guest User

Untitled

a guest
Dec 19th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. su - postgres
  2. create role <your_username> with createdb login password <your_password>
  3.  
  4. 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
  5.  
  6. $ sudo -i -u postgres psql
  7. postgres=# CREATE ROLE name_tealeaf WITH CREATEDB LOGIN PASSWORD 'password';
  8.  
  9. ---
  10.  
  11. config/database.yml
  12.  
  13. development:
  14. adapter: postgresql
  15. encoding: unicode
  16. database: myapp_dev
  17. pool: 5
  18. username: <your_username>
  19. password: <your_password>
  20.  
  21. test:
  22. adapter: postgresql
  23. encoding: unicode
  24. database: myapp_test
  25. pool: 5
  26. username: <your_username>
  27. password: <your_password>
  28.  
  29. 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
  30.  
  31. development:
  32. adapter: postgresql
  33. encoding: unicode
  34. database: myapp_dev
  35. host: localhost
  36. pool: 5
  37. username: <your_username>
  38. password: <your_password>
  39.  
  40. test:
  41. adapter: postgresql
  42. encoding: unicode
  43. database: myapp_test
  44. host: localhost
  45. pool: 5
  46. username: <your_username>
  47. password: <your_password>
Add Comment
Please, Sign In to add comment