Node.js uses an event-driven input-output (I/O) which makes it perfect for the implementation of real-time web applications. While Ruby on Rails was a server-side language that attempted to make the implementation of real-time applications a reality, Node.js actually is the server.
What makes Node.js more efficient than alternatives such as Apache is that it remains dormant when there are no connections. Apache, on the other hand, requires several idle servers to remain active to deal with new connections as they come. Since Node only activates a callback when new connections come in, server resources are saved.