Skip to content

How to setup connection to dev database? #176

Locked Answered by naXa777
naXa777 asked this question in Q&A
Discussion options

You must be logged in to vote

Oh man... it was my fault. I didn't check that my db is accepting connections. I needed to expose 5432 port correctly.

Also, I've added these missing properties to development and test environments in the database.yml file:

  username: potter_db_api
  password: <%= ENV["POTTER_DB_API_DATABASE_PASSWORD"] %>

without this change, when running rails db:create db:migrate, I've got this error:

connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
Couldn't create 'potter_db_api_development' database. Please check your configuration.
rails aborted!

And with this change, the db migrations run successfully.
Thank you for your help and let's close the discus…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by naXa777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants