Ruby Eco Compiler
Latest commit ef6182c Jun 4, 2011 @sstephenson Ruby Eco 1.0.0
Failed to load latest commit information.
lib Ruby Eco 1.0.0 Jun 4, 2011
test Ruby Eco 1.0.0 Jun 4, 2011
LICENSE Ruby Eco 1.0.0 Jun 4, 2011 Ruby Eco 1.0.0 Jun 4, 2011
Rakefile Ruby Eco 1.0.0 Jun 4, 2011
eco.gemspec Ruby Eco 1.0.0 Jun 4, 2011

Ruby Eco

Ruby Eco is a bridge to the official Eco compiler for embedded CoffeeScript templates.

require "eco"

# => "function(...) {...}"

context = Eco.context_for("Hello <%= @name %>")"render", :name => "Sam")
# => "Hello Sam"

Eco.render("Hello <%= @name %>", :name => "world")
# => "Hello world"


$ gem install eco


This library depends on the eco-source gem which is updated any time a new version of Eco is released. (The eco-source gem's version number is synced with each official Eco release.) This way you can build against different versions of Eco by requiring the correct version of the eco-source gem.

In addition, you can use this library with unreleased versions of Eco by setting the ECO_SOURCE_PATH environment variable:

export ECO_SOURCE_PATH=/path/to/eco/dist/eco.js

Ruby CoffeeScript

The Ruby CoffeeScript library is used to load the CoffeeScript compiler source. See the README for information on loading a specific version of the CoffeeScript compiler.


The ExecJS library is used to automatically choose the best JavaScript engine for your platform. Check out its README for a complete list of supported engines.