Rails ExecJS::RuntimeError with Rails V3.11
Contact me at LinkedIn  RailsZilla at Facebook  RailsZilla at twitter   google +1  Contact me at Xing  connect me at github

Rails ExecJS::RuntimeError with Rails V3.11

Posted in Rails

If you’re riding Ruby on Rails V3.11 and get the error

get rails ExecJS::RuntimeError

Then try installing the V8 Javascript interpreter into Ruby.

Just edit your Gemfile and add

gem 'therubyracer'

then execute the famous

bundle install

This has also several advantages, such like:

  • evaluate Javascript from with in Ruby
  • Embed your Ruby objects into the Javascript world
  • Manipulate JavaScript objects and call JavaScript functions from Ruby
  • API compatible with the The Ruby Rhino

Now rock on and have phun ;-)

Tags: , , , ,


  • I just want to mention I’m very new to weblog and absolutely liked your blog site. Most likely I’m going to bookmark your site . You certainly come with beneficial stories. Regards for sharing with us your web site.

  • Engelmae says:

    – “The 10 lines of PHP code will run faster than the 3 line of sialimr Ruby code”. Agreed! , this may have been true in the past but I don’t feel that this is true today with these Ruby implementations: Ruby 1.8.7, Ruby 1.9.1, Ruby 1.9.2, MacRuby, Maglev, Rubinius, IronRuby, JRuby, and others Ruby VMs.Now, I’m not saying that PHP is bad but the myth about Ruby is true anymore. Thus, it might have been good to take a simple example like sorting and write it in both PHP and Ruby whichcan demonstrated to the attendees.Recently, I went to an interview with a PHP shop and one person said something to the fact that Ruby has some performance problems. Thus, I took out my laptop (i.e. MacBook Pro 3.06 Ghz Intel Core 2 Duo, and 8GB RAM) and displayed the merge-sort algorithm implemented in both Ruby and PHP. BTW, this algorithm takes two identical sets consisting of 100 integers each and sorts them 3000 times. Then I ran the time tested Ruby code using Ruby 1.9.1. Next, I ran the time tested PHP code using the PHP 5.3.1. Ruby 1.9.1 was about 3.15X faster than PHP 5.3.1 being able to complete this task in under 2 seconds. Finally, it was clear that this myth wasn’t true.

Leave a Reply

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

Please enter a secure code to see if you are a spammer ;-)


Copyright © 2011-2018  - RailsZilla – Ruby on Rails tutorials, tips and tricks All rights reserved. | Imprint | Privacy