To prevent this from happening, add this to config/environments/test.rb.
Machinist.configure do |config| config.cache_objects = false end
Machinist.configure do |config| config.cache_objects = false end
sudo apt-get install postgresql libpq-dev pgadmin3 -y
rails new <project name> -d postgresql
gem 'pg'
sudo su postgres -c psql # Enters the psql console. create user "<username>" with [superuser] password "<password>"; # Outputs CREATE ROLE. \qThe superuser keyword is optional but makes things easier in development.
local all all identto
local all all md5
sudo service postgresql restart
createdb <project name>_development -U <username> -W createdb <project name>_test -U <username> -W