docbrown/docs/additional-postgres-setup.md
Andy Zhao 40f4997199 Update README/Docs (#670)
* Rename and add addl postgres setup

* Update ToC for docs/readme

* Add links + enrich license FAQ page (#671)

- Added brief "intro" section at the top
- Added back in links that were lost in copy/paste over

* Nick/task/update front end docs [skip ci]

* Clarify that each step is an or

* issue/pr templates

* Remove broken redirect from netlify

* Attempt to add redirects for Netlify

* Try to fix redirects for Netlify

* Added more redirects for netlify

* Fix redirects to use splat keyword

* Testing placeholder instead of splat

* add product roadmap

* Change doc contribution instructions

* Add notice at bottom
2018-08-08 12:40:20 -04:00

31 lines
1.5 KiB
Markdown

# Setup your application with PostgreSQL
Follow these links for detailed the installation guide.
1. [Mac OS](https://postgresapp.com/)
2. Linux / Ubuntu
- [Ubuntu `14.04`](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04)
- [Ubuntu `16.04 and higher`](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04)
3. [Windows](https://www.postgresql.org/download/windows/)
##### You can find all installation packages for different operating systems [here](https://www.postgresql.org/download/).
##### After installation
1. If your Rails app is unable to connect to the PostgreSQL, then update your `database.yml` file with `username` and `password`.
```yaml
development:
<<: *default
username: POSTGRESSQL_USERNAME
password: POSTGRESSQL_PASSWORD
test:
<<: *default
username: POSTGRESSQL_USERNAME
password: POSTGRESSQL_PASSWORD
```
2. While running test cases, if you get an error message `postgresql connection timeout`. Go to your `spec/support/database_cleaner.rb` file. And rename `:truncation` with `:deletion`.
##### Notes
1. Don't forget to set up your PostgreSQL with `username` and `password`.
2. Don't commit your `database.yml` or `database_cleaner.rb` files. Or PostgreSQL `username` and `password` to any repository.
3. You can use environment variables for storing `username` and `password`. You can define them inside the `application.yml` file.