0

I am trying to run some rspec tests for my Rails app but I get a Postgres connection error. It uses my system user, instead of the one I provided for the dev environement, in database.yml. Could someone have a look please? And maybe give me some doc to help me understand how it searches for the user role?

An error occurred while loading ./spec/helpers/navigation_helper_spec.rb.
Failure/Error: ActiveRecord::Migration.maintain_test_schema!
ActiveRecord::NoDatabaseError:
FATAL:  role "yopeso_internship" does not exist
# ./spec/rails_helper.rb:28:in `<top (required)>'
# ./spec/helpers/navigation_helper_spec.rb:1:in `<top (required)>'

# --- Caused by: ---
# PG::ConnectionBad:
#   FATAL:  role "yopeso_internship" does not exist
#   ./spec/rails_helper.rb:28:in `<top (required)>'
1
  • 1
    Please, show us your database.yml (without the passwords/secrets) Commented Jan 7, 2019 at 11:00

1 Answer 1

1

In your database.yml you are not providing valid credentials for your test environment like you did for development.

Also show your database.yml.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.