rails backend for iOS app, postgresql