Changing db connect logic to handle heroku db, adding configu.ru and profile for heroku