title: therubyracer or nodejs, which should I use?
body: <p>I am following the <a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow noreferrer">ruby on rails getting started guide</a> on a new install of Ubuntu 12.10. I'm up to running <code>rake db:create</code> but I get the following error:</p>
  
  <p>rake aborted!
  Could not find a JavaScript runtime. See <a href="https://github.com/sstephenson/execjs" rel="nofollow noreferrer">https://github.com/sstephenson/execjs</a> for a list of available runtimes.</p>
  
  <p>I've searched around and the suggested solutions (see list below) are to install some either therubyracer or nodejs but they don't explain why.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/q/9057475/1253708">rake db:create - Could not find a JavaScript runtime</a></li>
  <li><a href="https://stackoverflow.com/q/7092107/1253708">Rails 3.1  error - Could not find a JavaScript runtime?</a></li>
  <li><a href="http://datacodescotch.blogspot.com.au/2011/11/rails-31-spree-and-rake-aborted-could.html" rel="nofollow noreferrer">http://datacodescotch.blogspot.com.au/2011/11/rails-31-spree-and-rake-aborted-could.html</a></li>
  <li><a href="http://www.blog.railshouse.com/" rel="nofollow noreferrer">http://www.blog.railshouse.com/</a></li>
  </ul>
  
  <p>Before I go installing stuff I want to know what the differences are between these JavaScript runtimes and why I would choose one over the other?</p>
  
  <p>Update:</p>
  
  <p>I just read <a href="https://github.com/sstephenson/execjs" rel="nofollow noreferrer">https://github.com/sstephenson/execjs</a> (I know I should have read this first, sorry) and it seems to me that execjs is not a JavaScript runtime and I already have it... so it's down to therubyracer and nodejs ... please excuse my ignorance, I've amended my question</p>
  
  <p><strong>In addition to Intrepidd's answer:</strong></p>
  
  <p>The <a href="http://guides.rubyonrails.org/getting_started.html#starting-up-the-web-server" rel="nofollow noreferrer">ruby on rails getting started guide</a> supports Intrepidd's answer. See section <a href="http://guides.rubyonrails.org/getting_started.html#starting-up-the-web-server" rel="nofollow noreferrer">4.1 "Starting up the Web Server"</a> where it says:</p>
  
  <blockquote>
    <p>Rails adds the therubyracer gem to Gemfile in a commented line for new
    apps and you can uncomment if you need it.</p>
  </blockquote>
  
  <p>For the rails noobs out there (like me) the GemFile is in the root folder of your rails application. After uncommenting that line in my GemFile I had to run <code>bundle install</code> to install therubyracer gem.</p>