Build api service with rails