Add pg support and some gems for active record model