Forum: Ruby on Rails Ruby on Rails ExecJS::RuntimeError in Pages#home

53197663d96e40f051d53bb1b42b50db?d=identicon&s=25 Anishka Vaghani (pretty_g)
on 2013-09-30 08:02
I generated a page using a controller. But when I go to the
localhost:3000/pages/home. I got this error: ExecJS::RuntimeError in
Pages#home

How can I fix this? I found a solution here
http://stackoverflow.com/a/14118913/2829893

but I've no idea where to find ExecJS's runtimes.rb file.

I'm using complete package from here: http://railsinstaller.org/en

Any help will be appreciated. thank you.


Here is the full error code:

========================================
ExecJS::RuntimeError in Pages#home

Showing
C:/Users/Anishka/Desktop/test/myfirstapp/app/views/layouts/application.html.erb
where line #6 raised:


  (in
C:/Users/Anishka/Desktop/test/myfirstapp/app/assets/javascripts/pages.js.coffee)
Extracted source (around line #6):

3: <head>
4:   <title>Myfirstapp</title>
5:   <%= stylesheet_link_tag    "application", :media => "all" %>
6:   <%= javascript_include_tag "application" %>
7:   <%= csrf_meta_tags %>
8: </head>
9: <body>
Rails.root: C:/Users/Anishka/Desktop/test/myfirstapp

Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in
`_app_views_layouts_application_html_erb__601430158_32305500'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None
========================================
Dd5ad2ff6fe9fd92364528b599dc450e?d=identicon&s=25 Khizer Mehdi (Guest)
on 2013-09-30 13:57
(Received via mailing list)
Hi,
     add in Gemfile
 gem 'execjs'
gem 'therubyracer'  run bundle install and check

Regards
Mehdi
53197663d96e40f051d53bb1b42b50db?d=identicon&s=25 Anishka Vaghani (pretty_g)
on 2013-10-04 04:55
Khizer Mehdi wrote in post #1122896:
> Hi,
>      add in Gemfile
>  gem 'execjs'
> gem 'therubyracer'  run bundle install and check
>
> Regards
> Mehdi

Thanks, problem solved :)
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.