Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
319 stars 157 forks source link

Can't get Postgres installed #292

Closed kalimar closed 5 years ago

kalimar commented 5 years ago

@TheIncredibleHarsh moving the conversation over here to discuss postgres setup. The question as it stands is:

I am facing problem trying to setup postgres on my macbook pro 2019 macOSX mojave

Question for @theincredibleharsh: The docker-compose build command should take care of setting up Postgres for you. Are you doing some additional configuration? Can you share what you have done so far and what errors you are seeing?

Reference: https://github.com/Terrastories/terrastories/issues/288

TheIncredibleHarsh commented 5 years ago

docker-compose build runs fine, the next step gives authentication failed message. I just added the mapbox key in the .env.example and renamed it to .env. Is there a specific password?

kalimar commented 5 years ago

The password is postgres - Keep me updated 😺

TheIncredibleHarsh commented 5 years ago

(base) FWS-CHE-LT-2753:terrastories harshkumar$ docker-compose run web scripts/wait-for-it.sh db:5432 -- "rails db:create db:migrate db:seed" Starting terrastories_db_1 ... done wait-for-it.sh: waiting 15 seconds for db:5432 wait-for-it.sh: db:5432 is available after 0 seconds FATAL: password authentication failed for user "postgres" Couldn't create 'app_development' database. Please check your configuration. rails aborted! PG::ConnectionBad: FATAL: password authentication failed for user "postgres"

this is my .env

NGINX_PORT=3000 MAPBOX_STYLE=mapbox://styles/mapbox/light-v10 MAPBOX_ACCESS_TOKEN=#my token# DB_USER_PASSWORD=postgres DB_HOST=db

edit: On a different issue, shouldn't the command be rake db:create instead of rails db:create?

kalimar commented 5 years ago

So in rails 5 they decided to wrap rake commands with rails Here is some history on the topic https://blog.bigbinary.com/2016/01/14/rails-5-supports-rake-commands-using-rails.html

@TheIncredibleHarsh now that you have your .env adjusted, it might be quicker to blow away the repo and start over (just remember to update the .env file).

Otherwise we may need to pair some night this week.

kalimar commented 5 years ago

@TheIncredibleHarsh any luck with your environment?

TheIncredibleHarsh commented 5 years ago

Nope, I tried it from scratch and I am still getting 'password authentication failed for user "postgres" '

kalimar commented 5 years ago

Darn. @TheIncredibleHarsh you want to pair on this some time this week? We can screen share and try to troubleshoot together. What time zone are you in? i'm in eastern standard time.

TheIncredibleHarsh commented 5 years ago

I'm in IST, am free only after 9 PM i.e. 11:30 AM for you. PS: I'm kinda newbie to macbook and rails and everything in general so, the issue might be a simple one

kalimar commented 5 years ago

no problem @TheIncredibleHarsh - Can we make something work for my Friday 12pm (noon)? Are you in our slack channel? We can coordinate email addresses, etc there. https://rubyforgood.herokuapp.com/ is where you can sign up to join our slack. Cheers

TheIncredibleHarsh commented 5 years ago

Yes! I'll text you there, My name is Harsh kumar. Friday is fine for me.

mirandawang commented 5 years ago

Closing for now! Will talk via Slack.