I could code the server in C++, but the client app is meant to be installed on android mobile devices, thus I'd better code it in java.
What just happened right there? The client environment has nothing to do with the language the server is written in. IP derived protocols are platform agnostic. As long as you take control of your byte ordering and serialization you should be fine.
My one word of advice though, is that you use some tool like wireshark or etc to ensure that your socket IO is as expected at both ends. I ran into a problem once where an IO method I was using was tacking a "\n" on the end of outbound data and it took me a week to figure out what was happening. I could have avoided all of that by just glancing at the data on the wire.
Java is less resource hogging than Ruby
Well, Ruby's gotta have somewhere to put in all that extra deliciousness.