[ Update . As Ben points out below, sstephenson - the creator of Eco and a member of the Rails group - created something called ruby-eco , which allows the two to play well together. My initial answer below precedes this project.]
It is not possible to do this directly because Eco runs on Node.js and you cannot run Node.js directly in Rails (see this related question ).
You can proxy specific routes from your Rails application to a Node.js application running on a different port, but there would be no easy way to transfer information between the two applications, so this would probably be pointless.
Currently Eco vs. Rails is either a solution or a solution. But if you don't want to jump from Rails to Node, you can still use server-side JavaScript templating using Johnson , which allows you to run JS from Ruby. (As far as I know, no one has written CoffeeScript-Johnson integration yet - you could write it quite easily, though, using the coffee -pe to convert CoffeeScript to JavaScript.)
source share