Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Running JavaScript in Ruby

#297 Running JavaScript in Ruby pro

Nov 07, 2011 | 14 minutes | Views, Ajax, Plugins
Sometimes logic needs to be shared between the server-side (Ruby) and the client-side (JavaScript). Here I show how to run JavaScript directly in Ruby through ExecJS and therubyracer.