Added postgres gem to gemfile. Fixed broken controller