PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

You have to create corresponding user and database manually like this:

in shell: psql

then:

  create user alphauser with password 'alphapassword';
  create database alpha_database owner alphauser;
  alter user alphauser superuser createrole createdb replication;
  \q

don't forget semicolons.


Try to use:

sudo -u postgres createuser --interactive --pwprompt

to add the role and the password


So the problem is with your rails application using the database.yml file to try and connect to your local database and failing to find the user alphauser (since I assume you're using different computers/environments as the previous students).

Databases have users similar to applications, the postgres documentation is pretty dense on this, but I would guess if you can create a user alphauser, and make it's password alphapassword then you will have a new clean database for your app that you can run rake db:migrate on.

Postgres docs: http://www.postgresql.org/docs/9.2/static/app-createuser.html

Try running this command from the command line createuser -P -s -e alphauser

This will prompt for a password, which is alphauserpassword