Installing Ruby/TroubleShoot

I am having trouble with the Ruby on Rails for a windows 7 PC.

During the installation on Ruby it said missing file 'lib'

Then every time I try to generate a scaffold or controller it says
Could not find a JavaScript runtime. See for a list of available runtimes.
(ExecJS: :RuntimeUnavailable)


You “may” be able to find a work-around for this issue as follows:

  • edit the Gemfile

  • add the line to the bottom

    gem ‘therubyracer’

  • rerun

    bundle install

I am not sure this will work on your set-up, but you could try. If it
does not help, remove that newly added line and rerun

bundle install



For some reason exejs is failing to find "cscript" (The default
Windows JavaScript script engine) in your system.

You can workaround that by installing latest Node.JS from here:

(Use the MSI installer)

After you installed, close all the Command Prompt windows you have
open and open them again, which will update the PATH so node.exe is

You can verify it worked by doing:

C:\>node --version

That should be the output.

After that ExecJS should be working properly.