Added PostgreSQL to Gemfile.
Duplicated code in post controller and ruby ver.

* Added ruby version to Gemfile.

* Removed duplicated code from the posts controller (afrer CodeClimate.com
  recommendation).