Setting up your database

By | 31/10/2019

I remember when starting out in rails I had never used postgres previously and setting it up seemed a nightmare – it’s actually not.

You basically need to set up a user and database. It’ll look for a database with the same name as the username – lets say your login username is LaraDev – you’d enter

$ CREATEUSER LaraDev --superuser --createdb --password 

It’ll prompt you for a user password. Then create the database allocated to the user

$ CREATEDB LaraDev -O LaraDev