I've cloned a repository, and set up everything via a virtual machine loaded with Ubuntu and using RVM. Everything regarding Ruby on Rails was installed via RVM.
My issue is that, my Ubuntu login is different to the user that I assume the data base wants. Example, my Ubuntu login is Matt, but when I start rails server and load into the localhost:3000, it is saying this:
ActiveRecord::NoDatabaseError
FATAL: role "James" does not exist
I understand this is a postgres error, but what should I do now to make this work? I've search through the previous StackOverflow answers and the methods just don't work.
Eg. I've changed
local all postgres peer
to
local all postgres trust
Or using psql -h localhost -U postgres
or sudo -u postgres createuser -s $(whoami); createdb $(whoami)
and again, it doesn't work. The first command asks for a password, which I can't figure out.