modify db gem to be compatible with deploy to heroku