Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

558
Views
Rails spec test error, no password supplied

I have an existing project, with created many years ago. No one at out company has succeeded in running them. I have updated files to fit the latest rails version but when I run bundle exec rspec spec/models/promo_code_spec.rb,

I get

   /Users/mmiller/.rvm/gems/ruby-2.1.6@global/gems/activerecord-4.1.9/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize': fe_sendauth: no password supplied (PG::ConnectionBad)

I have followed these steps in this post: fe_sendauth: no password supplied but still getting the same error. Any advice on how to resolve this issue?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Change this,

local   all             all                                     trust

to,

local   all             all                                     md5

and create a super_user in PostgreSQL with username and password, and add that username and password to your database.yml file

over 4 years ago · Santiago Trujillo Report

0

Welp, for my case, as a complete new user of Rails testing of any kind, I got this error when I wanted to use RSpec and forgot to create a test database. Make sure your test db has been assigned its own name in database.yml.

One helpful SO post mentioned this command line to get things initialized:

bundle exec rake db:reset RAILS_ENV=test

Then on to joy...

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!