- Clone repository
https://github.com/ansh-k/bookstore-api.git
- Change to directory:
cd bookmark-api
- Copy the
.sample.env
file as.env
and then add your actual values into the.env
file, and we don't track that file through source control.cp .sample.env .env
- Install required gems
bundle install
- Install Postgres
- Edit /etc/postgresql/10/main/pg_hba.conf to have this line
local all all trust
- Restart postgres:
sudo service postgresql restart
- Create databases:
rake db:create
- Run migrations:
rake db:migrate
- Populate seed data
rake db:seed
- Start server
rails s