TheRubyRacer gem on Windows

If you’re having some trouble trying to install `therubyracer` on a Windows 8.1 machine we could be best friends. I’ve spent a bit of this evening getting my belt-tracker application back and running how it was (after a series of unfortunate events over the last weekend) and after I fixed my migrations and ran `bundle install` everything seemed okay.

I fired up the server (and that worked) then I opened up Chrome and was ready to get back to work unfortunately I was presented with an error sayin:

ExecJS Runtime failure at /

ExecJS is the Windows JavaScript runtime environment.

After reading error logs and a few posts around the place no one really seemed to have a solid fix.

Here is what I did to get it done:

  • Deleted gemfile.lock
  • Installed Python 2.7.5
  • Installed NodeJS

After I did these three things I was able to run bundle install again and now my project is back to how it should be.

Why I wanted to do it this way

A few posts around the internet suggest just running TheRubyRacer in your production environment but I don’t like that much. I already understand that I’m using a Windows machine and will be deploying to a Unix operating system (Ubuntu) but I want to mimic my production environment as much as possible.

Following the three steps above will solve all your Ruby Racer problems.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like