Can't complete the Getting Started tutorial due to ExecJS::RuntimeError in Home#index

I have just installed Rails 3.2.1 on my Xubuntu using the gem system
and I try to make the tutorial

and on section 4.3 Setting the Application Home Page I get the
following error

ExecJS::RuntimeError in Home#index

Showing /home/xonx/rails/blog/app/views/layouts/application.html.erb
where line #6 raised:

(in /home/xonx/rails/blog/app/assets/javascripts/home.js.coffee)
Extracted source (around line #6):

3:
4: Blog
5: <%= stylesheet_link_tag “application”, :media => “all” %>
6: <%= javascript_include_tag “application” %>
7: <%= csrf_meta_tags %>
8:
9:
Rails.root: /home/xonx/rails/blog

I was doing everything exactly as said in the tutorial and don’t
understand what the problem might be.

Your error message isn’t very informative! Do you have a javascript
runtime installed? You can try:

$sudo apt-get install nodejs

Or adding

gem ‘therubyracer’, ‘>=0.8.2’

to your Gemfile, then run bundle install.

-----Oprindelig meddelelse-----
Fra: [email protected]
[mailto:[email protected]] P vegne af XonX
Sendt: 6. februar 2012 02:16
Til: Ruby on Rails: Talk
Emne: [Rails] Can’t complete the Getting Started tutorial due to
ExecJS::RuntimeError in Home#index

I have just installed Rails 3.2.1 on my Xubuntu using the gem system and
I try to make the tutorial

and on section 4.3 Setting the Application Home Page I get the following
error

ExecJS::RuntimeError in Home#index

Showing /home/xonx/rails/blog/app/views/layouts/application.html.erb
where line #6 raised:

(in /home/xonx/rails/blog/app/assets/javascripts/home.js.coffee)
Extracted source (around line #6):

3:
4: Blog
5: <%= stylesheet_link_tag “application”, :media => “all” %>
6: <%= javascript_include_tag “application” %>
7: <%= csrf_meta_tags %>
8:
9:
Rails.root: /home/xonx/rails/blog

I was doing everything exactly as said in the tutorial and don’t
understand what the problem might be.

–
You received this message because you are subscribed to the Google
Groups “Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On Mon, Feb 6, 2012 at 10:46 AM, Brynjolfur T.
[email protected]wrote:

Your error message isn’t very informative! Do you have a javascript
runtime installed? You can try:

$sudo apt-get install nodejs

Out of curiosity. This worked on a Ubuntu 11.10, but on
an Ubuntu 10.04 the package seems not present.

Could it be the case that this package was only recently
added to the Debian/Ubuntu standard package lists?

Thanks,

Peter

Your error message isn’t very informative!

Yeah, but it’s the only one I’ve got, unfortunately.

gem ‘therubyracer’, ‘>=0.8.2’

It helped. The error disappeared. Thank you.