Handling the response sent from a ruby on rails application in wordpress

I think you’re basically recreating what the »JSON API Plugin« already does. It should work hands in hands with your Ruby App without a problem and server all your normal as well as CPT tasks.