I am trying to set up Discourse on Windows subsystem for Linux and keep running into this issue. I must have gone through the steps at least 3 times now.
I got to the part of starting redis and postgres and successfully got them running.
And then I try to run the bundle exec rake db:create db:migrate command and then I run into this error.
I am positive I set my psql user to the same as my Ubuntu user. Went and changed the default passwords to my own and also tried it with the default passwords and still no dice. Been pulling my hair trying to fix this issue.
I have read that you may need to change the config file but I am unsure of how to do that through the Ubuntu terminal.
Yup. Followed all the steps. Made sure my Ubuntu was downloaded properly and updated. Cloned the repo, created postgres role and installed the bundle in my project folder.
Ok. Seem to be getting somewhere. I restarted Ubuntu and ran the commands to start but now when I start the server it throws me this error psql: FATAL: database "jamesdev" does not exist
but when I try sudo -u postgres createuser -s jamesdev
I get this error createuser: creation of new role failed: ERROR: role "jamesdev" already exists
So I took a look at my dbs and this is what showed up. Looks like the access privileges are missing?
Also tried dropping db and creating it a couple times and same error persists.
Edit: Deleted the database and created it again and modified with access privileges and I can see that it is now granted access privileges but still no dice.
Edit: also cannot post anymore for my first day
LAST EDIT: I finally found the issue. I had postgresql installed in my Windows OS and it was set to default at port 5432 and Linux was not letting me change the port. After making sure my permissions and server were up and running I was finally able to run bundle exec and get everything spun up.