Add 12factor gem

Needed to properly handle assets in heroku.
Fix comparison error in pg

cast int to string