Initial commit, startup rails using rails-api gem

add postgresql gem, add needed config.