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?
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
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...