title: Problems with Rails and JavaScript runtime on Windows machine
body: <p>I am currently in a web development class and we are using Ruby on Rails. </p>
  
  <p>I am using Ruby v1.9.2 and Rails v3.1.1.</p>
  
  <p>My initial problem started when I tried to execute 'rails server'.</p>
  
  <p>I would get the following error: </p>
  
  <pre><code>C:\Sites\rorProjects\basicRoRProject&gt;rails server   
  C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/execjs-1.2.13/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime.   
  See https://github.com/sstephenson/execjs for a list of available runtimes.(ExecJS::RuntimeUnavailable)
  </code></pre>
  
  <p>I have done some reading and the general consensus is to install the gems 'execjs' and 'therubyracer'. 'execjs' installed just fine, however when I tried to install 'therubyracer' I got the following error:</p>
  
  <pre><code>Temporarily enhancing PATH to include DevKit...
  Building native extensions.  This could take a while...
  ERROR:  Error installing therubyracer: ERROR: Failed to build gem native extension.
          C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
  *** extconf.rb failed ***  
  Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  
  Check the mkmf.log file for more details.  
  You may need configuration options.
  </code></pre>
  
  <p>I then did some more reading and found a couple of people said to check that they had the gem 'libv8', which was required for 'therubyracer'. I did that and discovered that I didn't have it, so I then went to install that and got the same error that I did for 'therubyracer'.</p>
  
  <p>I'm at a loss to think of anything else to do. Any help would be greatly appreciated.</p>
  
  <p>Thanks guys!</p>
  
  <p>THIS PROBLEM HAS BEEN SOLVED.</p>
  
  <p>So, with the help of one of my classmates who had a similar problem, I installed Node.js using the Windows installer (this gave me a JavaScript run-time environment). I then added it to the path in the local variables.</p>