add pg to gemfile and adjust database config.