I have 3 pieces of output I feel might be useful.
1) Rails Output Log: from /home/vagrant/alaveteli/spec/factories/alaveteli_pro/draft_info_request_batches.rb:16:in `block in <top (required)>'
vagrant@alaveteli-stretch64:~/alaveteli$ bundle exec rails server -b 0.0.0.0
/home/vagrant/.rvm/rubies/ruby-3.0.0/bin/ruby: warning: shebang line ending with \r may cause problems
=> Booting Thin
=> Run `rails server --help` for more startup options
Exiting
/home/vagrant/.rvm/gems/ruby-3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `initialize': FATAL: Peer authentication failed for user "postgres" (PG::ConnectionBad)
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `new'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/pg-1.2.3/lib/pg.rb:58:in `connect'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:46:in `postgresql_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:887:in `new_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `checkout_new_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:910:in `try_to_checkout_new_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:871:in `acquire_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:593:in `checkout'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:437:in `connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1125:in `retrieve_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_handling.rb:221:in `retrieve_connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/connection_handling.rb:189:in `connection'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/model_schema.rb:369:in `table_exists?'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/attribute_methods/primary_key.rb:91:in `get_primary_key'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/attribute_methods/primary_key.rb:79:in `reset_primary_key'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activerecord-6.0.4.1/lib/active_record/attribute_methods/primary_key.rb:67:in `primary_key'
from /home/vagrant/.rvm/gems/ruby-3.0.0/bundler/gems/acts_as_versioned-63b1fc8529d0/lib/acts_as_versioned.rb:179:in `acts_as_versioned'
from /home/vagrant/alaveteli/app/models/public_body.rb:119:in `<class:PublicBody>'
from /home/vagrant/alaveteli/app/models/public_body.rb:37:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:515:in `load'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:515:in `block in load_file'
from /home/vagrant/.rvm/gems/ruby-3.0.0/gems/activesupport-6.0.4.1/lib/active_support/dependencies.rb:706:in `new_constants_in'...................
2) /etc/postgresql/9.6/main/pg_hba.conf:
local all postgres peer
3) database.yml:
development:
adapter: postgresql
template: template_utf8
username: postgres
pasword: postgres123
database: foi_development
4) sudo -u postgres psql \l:
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------------+----------+----------+-------------+-------------+-----------------------
foi_development | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
foi_test | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
I suspect I may need to alter permissions for foi_test and foi_development...