Fix Gemfile and Gemfile.lock

Add gem pg to production group and move gem sqlite3 to development and test group for deployment
Only add the precommit checks in development environments.
Merge pull request #330 from DevYah/deployment_configuration

Deployment configuration: use postgres.