Rails is another good selection but in this game, you need socket communication. You need fully active connection with server. So, NodeJS’s socket programming is very good then Rails. You can serve an API with Rails about your game. So other developers can make applications with your api.