I'm not very updated in the event-driven/concurrency area in node.js. I wonder, is it possible that node.js would replace Ruby on Rails completely in the future?
Or is it more like an extension to Ruby on Rails for the real time features?
I'm not sure exactly what you mean by "could replace". Ruby on Rails and Node.js really have nothing to do with each other, so it doesn't make sense to compare them. Ruby is a programming language and Rails is a web application framework. Node.js is neither a language nor an application framework, it's an asynchronous I/O library.
There are asynchronous I/O libraries for Ruby as well, like EventMachine or Cool.IO for example. And of course there's Twisted for Python, Async, Event and EV for Perl, Rx for .NET, Async Computation Expressions for F# and libaio, libevent and libev for C. (BTW: Node.js is actually implemented using libev.) Node.js isn't even the only such library for ECMAScript, there's a port of Rx for ECMAScript as well. It would make much more sense to compare those to Node.js than Ruby on Rails.
(If you really want to compare Ruby on Rails to something, compare it to Express.js, which is a web framework built on top of Node.js. Although it actually is more akin to Sinatra or maybe Padrino than Rails. Otherwise the comparison doesn't make sense: the only thing that Ruby on Rails and Node.js have in common is that both are Turing-complete, and in some sense everything that is Turing-complete can replace everything else, but that's not a particularly useful result.)
So, Node.js really is nothing special. Evented I/O has been around for a very long time, and there are many stable and mature (much more so than Node.js, in fact!) implementations for just about any language on earth. In fact, Node.js itself actually uses libev and libeio.
The thing that makes Node.js different from all those other libraries is ECMAScript. Actually, the thing that makes Node.js so great is that ECMAScript is crap, or more precisely that the ECMAScript standard library is crap. In ECMAScript, you practically can't do anything: you can't read files, load scripts, access the network. You can't even access the friggin' web, which is kind of ironic for a web scripting language.
When you are within the event loop, you cannot make any blocking calls. However, pretty much the entire Ruby IO, File and Dir classes, as well as the networking and database libraries and so on are all mostly synchronous and blocking. (And the same is true for pretty much all of the other languages as well.) So, when you write code in EventMachine or Cool.IO or Twisted, you have to be very careful which methods you call and which libraries you use in order to avoid accidentally making blocking I/O calls.
In ECMAScript, you cannot accidentally make blocking I/O calls, because you simply can't make any I/O calls at all: there are no I/O functions in the ECMAScript standard library.
Which means that any I/O functions you might want to call, have to be specifically implemented for Node.js. And obviously, if you implement it specifically for Node.js, you do it in an asynchronous fashion. That's what distinguishes Node.js from, say, EventMachine or Twisted: the fact that the entire I/O library was built from the ground up for Node.js. If you wanted to do that for EventMachine, you would first have to rip out the entire existing Ruby I/O library and then rebuild it from scratch. In ECMAScript, there's nothing to rip out and nothing to rebuild. You simply start with the "right" design from day one.
And that's exactly what Ryan did.
Another difference between EventMachine and Node.js is that Ruby programmers are typically trained in a synchronous mindset. ECMAScript programmers however, usually start their career with the DOM, which is completely asynchronous. (Ever wondered what the A in AJAX stands for? Asynchronous JavaScript and XML!) So, they never even know that something like synchronous I/O even exists! It's like that old joke about learning Chinese: it can't be that hard, even two year old Chinese kids speak it …