0

I'm still getting the ExecJS::RuntimeError even when I went through the ways to fix it based on this post: ExecJS::RuntimeError on Windows trying to follow rubytutorial

I found out that my issue was when I require the tree . in my file. This error came up when i simply generated a new controller called info and it made the coffee script for it.

Putting *= require info doesn't work either as it still throws the same error:

ExecJS::RuntimeError at /

["ok","(function() {\n\n\n}).call(this);\n"] 
(in C:/Users/..../assets/javascripts/info.js.coffee)

So what else could I use besides //= require_tree .?

P.S.Im on Windows 7 64x.

Community
  • 1
  • 1
LearningRoR
  • 26,582
  • 22
  • 85
  • 150

1 Answers1

1

I usually don't use //= require_tree . Instead I put <%= javascript_include_tag "application", controller_name %> in app/views/layouts/application so it will include the javascript file that belongs to the controller. If that doesn't work out, you may want to change the JS runtime to node.js

Hope this helps

Firyn
  • 312
  • 3
  • 15
  • When I run the `thin` server I see it says `The system cannot find the path specified.`. When I run `node -v` it shows me the version and my PATH is all setup, yet node doesn't working. How would I change the JS runtime to node? – LearningRoR Jun 03 '13 at 01:36
  • I suppose you just comment out the `execjs` in the gem file, and install the node.js in whatever way it is installed on windows – Firyn Jun 03 '13 at 04:31