ExecJS::RuntimeError in Welcome#index in step 8 of the railsinstaller instructions in windows 8

4,225 views
Skip to first unread message

Maurice Schekkerman

unread,
Feb 9, 2013, 8:31:49 AM2/9/13
to railsin...@googlegroups.com
I'm trying to get into Ruby on Rails in Windows 8 so I downloaded and installed railsinstaller 2.1.0 and followed the step-by-step instructions (with as only change the move of the C:\Sites directory to E:\Sites as C: is my SSD disk). But after replacing the static index.html with the controller generated in step 7, I get the following error.

   ExecJS::RuntimeError in Welcome#index

Showing E:/Sites/railsinstaller_demo/app/views/layouts/application.html.erb where line #6 raised:


  (in E:/Sites/railsinstaller_demo/app/assets/javascripts/welcome.js.coffee)

Extracted source (around line #6):

3: <head>
4:   <title>RailsinstallerDemo</title>
5:   <%= stylesheet_link_tag    "application", :media => "all" %>
6:   <%= javascript_include_tag "application" %>
7:   <%= csrf_meta_tags %>
8: </head>
9: <body>

Rails.root: E:/Sites/railsinstaller_demo

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

Searching the web I found the problem is probably related to the asset pipeline, and setting config.assets.enabled = false in config/application.rb 'solves' the problems, but I don't want to disable the asset pipeline as it breaks the exercises in my Rails course book. Any suggestions?

Luis Lavena

unread,
Feb 9, 2013, 9:01:14 AM2/9/13
to railsin...@googlegroups.com
On Sat, Feb 9, 2013 at 10:31 AM, Maurice Schekkerman <sche...@gmail.com> wrote:
> I'm trying to get into Ruby on Rails in Windows 8 so I downloaded and
> installed railsinstaller 2.1.0 and followed the step-by-step instructions
> (with as only change the move of the C:\Sites directory to E:\Sites as C: is
> my SSD disk). But after replacing the static index.html with the controller
> generated in step 7, I get the following error.
>
> ExecJS::RuntimeError in Welcome#index
>

Hello,

Most of the time the above error indicates ExecJS failed to find a
valid JavaScript engine.

Please close your open command prompt windows. Install NodeJS and then
open Rails Command Prompt again, it should fix the missing engine.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Maurice Schekkerman

unread,
Feb 9, 2013, 9:30:40 AM2/9/13
to railsin...@googlegroups.com
On Saturday, February 9, 2013 3:01:14 PM UTC+1, Luis Lavena wrote:
Most of the time the above error indicates ExecJS failed to find a 
valid JavaScript engine.

Please close your open command prompt windows. Install NodeJS and then
open Rails Command Prompt again, it should fix the missing engine.

I downloaded and installed the 64-bit Windows Installer for version v0.8.19 of nodejs, opened a new command prompt, started the rails server and... got the same error. So it doesn't seem to be a missing JavaScript engine.
 

Bryan Bibat

unread,
Feb 9, 2013, 10:01:18 AM2/9/13
to railsin...@googlegroups.com
Have you double checked that NodeJS is in your path i.e. node -v works?

 

--
You received this message because you are subscribed to the Google Groups "RailsInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsinstalle...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Bryan Bibat
Freelance Software Engineer
http://www.bryanbibat.net

Maurice Schekkerman

unread,
Feb 9, 2013, 10:16:34 AM2/9/13
to railsin...@googlegroups.com


On Saturday, February 9, 2013 4:01:18 PM UTC+1, Bryan Bibat wrote:
Have you double checked that NodeJS is in your path i.e. node -v works?

I have now, and that fixed it.

So to summarize. To get railsinstaller 2.1.0 properly working on 64-bits windows 8 I had to manually install the 64 bit-version of nodejs and add its installation directory (C:\Program Files\nodejs) to my PATH.

Thanks for the prompt replies!

Michael Hughes

unread,
Mar 22, 2013, 5:16:28 PM3/22/13
to railsin...@googlegroups.com
Just trying to dip my toes in to the world of Ruby, and I was totally flumoxed why I couldn't get it to work. Thanks for spelling out exactly what was needed.

Scott Wallace

unread,
Aug 18, 2013, 11:29:41 PM8/18/13
to railsin...@googlegroups.com
When you say to add its install directory to your PATH, do you mean to add it to the PATH for the environment variables?

Evan Machnic

unread,
Aug 19, 2013, 9:49:26 AM8/19/13
to railsin...@googlegroups.com
Scott,

Yes, you will need to add the path of the executable to the PATH environment variable.

Evan



Evan B. Machnic // Deployment Engineer

Engine Yard

The Leading Platform as a Service

Office: 415.994.5365

Skype: evan.ey

Twitter:  @emachnic


Distill: A conference to explore the development of inspired applications
Tickets are now on sale, be sure to get yours before they sell out!





--
Message has been deleted

Guilherme Oderdenge

unread,
Nov 27, 2013, 8:28:47 AM11/27/13
to railsin...@googlegroups.com
This doesn't worked for me. I've installed NodeJS correctly (C:\Program Files\nodejs) and it is enabled on PATH (node -v worked) but no success. Ideas?

Bryan Bibat

unread,
Nov 27, 2013, 8:52:22 AM11/27/13
to railsin...@googlegroups.com
Did you start a new server on the terminal where node -v works?
Note that the PATH isn't applied to already open terminals, and only works on new terminals.


--
You received this message because you are subscribed to the Google Groups "RailsInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsinstalle...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Guilherme Oderdenge

unread,
Nov 27, 2013, 10:41:11 AM11/27/13
to railsin...@googlegroups.com
Yes, I did.

Luis Lavena

unread,
Nov 27, 2013, 1:07:28 PM11/27/13
to RailsInstaller
On Wed, Nov 27, 2013 at 12:41 PM, Guilherme Oderdenge <guilherme...@gmail.com> wrote:
Yes, I did.


Can you open a new terminal, and copy the content of the response of "SET PATH" variable?
(you can look at the web how to copy text from the terminal in Windows)

Then, please also copy the output that you obtain when run `rails server`.



--

Geno Lagana

unread,
Feb 9, 2015, 8:28:15 PM2/9/15
to railsin...@googlegroups.com
I was able to fix it by putting the program directly into my C: drive
Reply all
Reply to author
Forward
0 new messages