The Ruby Racer: Under the Hood
summary
A gem embeds the V8 interpreter into the Ruby process so Ruby code evaluates JavaScript, gets direct JS object references and invokes JS functions, and JavaScript can call Ruby methods or instantiate Ruby classes. Teams run unit tests headless using jsdom and node html parser on CI, share Handlebars/Mustache templates and validation/business logic between client and server, and compile Less via the gem; garbage collection and safe-eval sandboxes are the hard engineering problems but the integration works and yields real performance and reuse benefits.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:36Why use the Ruby Racer
- 5:25What is a JavaScript runtime
- 7:10JavaScript objects
- 10:15JavaScript methods
- 15:55Embedded classes
- 17:06Property access
- 18:04Process access
- 19:35Safety Valley
- 22:51Multithreading
- 24:18Challenges
- 26:08Quick List
- 26:25Conclusion
- 28:10Questions
related talks
35mHow I Learned to Love Javascript
24mReusing your frontend JS on the server with The Ruby Racer and/or Ruby Rhino
46mEmbracing Collaboration with JRuby and JavaScript
35mRuby is the Best Javascript
35mRuby is the Best Javascript
29mRuby Internals: A Guide For Rails Developers
30mDropping down to The Metal™
45mEfficient Ruby to Javascript Compilation and Applications
