small medium large xlarge

Generic-user-small
15 Nov 2011, 20:20
Alan Anderson (6 posts)

I’m just getting started. I’ve followed the instructions in the book (I think), I’m on page 16. When I type in “rails server” I get an error: “Could not find a JavaScript runtimes. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable>

So, I went to https://github.com/sstephenson/execjs and downloaded the zip file. What do I do now? I’m guessing I do a gem install something….

Thanks, Alan

Samr_small_pragsmall
15 Nov 2011, 20:47
Sam Ruby (634 posts)

What operating system are you using? If you are using Windows or Mac OSX, execjs is typically able to find a preinstalled runtime. If you are using Linux, the quickest way to get up and running is to install nodejs:

https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Generic-user-small
15 Nov 2011, 20:59
Alan Anderson (6 posts)

Hi:

I’m using Windows XP.

Thanks, Alan

Generic-user-small
15 Nov 2011, 21:01
Alan Anderson (6 posts)

Also what program do I need to view README.md?

Thanks, Alan

Samr_small_pragsmall
16 Nov 2011, 15:19
Sam Ruby (634 posts)

Can you verify that ExecJS can find a runtime?

C:\Users\rubys\work\demo>ruby -r execjs -e "p ExecJS.runtime.name"
"JScript"

People’s tastes in editor’s vary, but here’s a free editor that you can try: http://notepad-plus-plus.org/

Generic-user-small
16 Nov 2011, 17:58
Alan Anderson (6 posts)

I typed in ruby -r execjs -e “p ExecJS.runtime.name” “JScript”

It came back with the following:

C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs/runtimes.rb:47:in ‘autodetect’: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-1.2.9/lib/execjs.rb:5:in ‘'

Thanks, Alan

Samr_small_pragsmall
16 Nov 2011, 22:30
Sam Ruby (634 posts)

I’m not sure where the best place is to ask execjs support questions, but it does appear that one of the supported runtimes, namely node.js, now has a Windows installer:

http://nodejs.org/#download

I don’t have a Windows machine that does NOT have JScript (after all, it is a part of IE) to test out if Node.js is a viable alternative on windows to test this out in advance, but perhaps you can try it.

Generic-user-small
16 Nov 2011, 22:41
Alan Anderson (6 posts)

Yes!!!

That worked!

Thanks much, Alan

You must be logged in to comment