If you are creating a production (non-development) install…
Please spend less than 30 minutes and complete a re-install from scratch on a clean Digital Ocean droplet using the official guide:
https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
Totally worth it!
You will totally avoid hours of pain.