Add pg to Gemfile
Revert "Remove exception for search query length"

This reverts commit 5db8f5f04fc17c350beb4105d7d0b0b8ff82eccb.
Make app a Rack app