ExecJS::RuntimeError in Users#index when doing second demo

Hi all,

am working through Michael H.'s tutorial and can’t get past the
start of the second tutorial. i’ve tried everything i can think of at
this point, lots of googling etc… no luck… found a reference to the
problem on google and the execjs has been “fixed” for this bug but it
doesn’t seem to fix it on my sys - i double checked the gem version
and i have the newest… still no luck.

I’m using Windows XP, ruby 1.8.7, rails 3.1.0 and i also tried the new
rc1 version… same problems…

here’s the error:
ExecJS::RuntimeError in Users#index

Showing /home/max/rails_proj/demo_app/app/views/layouts/
application.html.erb where line #6 raised:

湉異⁴牅潲㩲唠歮潮湷漠瑰潩⼢浴⽰硥捥獪〲ㄱ㤰㔲㈭㈹ⴸ㘱〵戴⵪⸰獪•灳捥晩敩⹤਍
(in /home/max/rails_proj/demo_app/app/assets/javascripts/
users.js.coffee)
Extracted source (around line #6):

3:
4: DemoApp
5: <%= stylesheet_link_tag “application” %>
6: <%= javascript_include_tag “application” %>
7: <%= csrf_meta_tags %>
8:
9:
Rails.root: /home/max/rails_proj/demo_app

Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in
_app_views_layouts_application_html_erb__1031573605_1065703900' app/controllers/users_controller.rb:7:inindex’

thanks for any help…

I had the same problem, that I solved installing a java runtime in
Ubuntu:
sudo apt-get install nodejs

I follow this post:
http://www.adanacs.com/node/3

On Oct 16, 12:03pm, Carlos Gustavo G. [email protected]
wrote:

I had the same problem, that I solved installing a java runtime in
Ubuntu:
sudo apt-get install nodejs

I follow this post:http://www.adanacs.com/node/3

To be clear, the problem is caused by the lack of javascript
runtime support NOT java. For a list of libraries see
https://github.com/sstephenson/execjs

An alternative to installing node.js is to simply add
gem “therubyracer”
to your Gemfile and run “bundle install” again.

PS - I’ve needed to add javascript support when installing
on both Ubuntu and Debian recently. Specifically, I get a
ExecJS::RuntimeUnavailable error when trying to
run “rails generate” or “rails server” on a newly
installed 3.1.1. (“rails new” runs without complaint.)
The fixes above get things rolling again.
Is there a known bug that I’ve missed somehow?

Dan N.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs