Sign in through GitHub

RailsCasts Pro episodes are now free!

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.
  • Download:
  • source codeProject Files in Zip (110 KB)
  • mp4Full Size H.264 Video (36 MB)
  • m4vSmaller H.264 Video (17.1 MB)
  • webmFull Size VP8 Video (18.9 MB)
  • ogvFull Size Theora Video (40.2 MB)