Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Michael Bedran
Michael Bedran
1,117 Points

Ruby Status Issue

I have followed all the directions and have redone the status project about 3 times and still receive this error when attempting to pull up the web page in the browser: ExecJS::RuntimeError in Statuses#index

I am unsure if it is because i am using windows 8 or not.

Any help would be much appreciated.

7 Answers

Timothy Chan
Timothy Chan
3,715 Points

Solved.

Tried node -v and it did not work.

Followed and added path - which now works: http://stackoverflow.com/questions/8768549/node-js-doesnt-recognize-system-path

Go to the folder in which you have Node and NPM (such as C:\Program Files (x86)\nodejs) and type the following:

set path=%PATH%;%CD% setx path "%PATH%"

Jay Killeen
PLUS
Jay Killeen
Courses Plus Student 3,725 Points

I just went through this same problem.

I used the solution found on this page of StackExchange

http://stackoverflow.com/questions/13530042/execjsruntimeerror-in-usersindex-ror

The only difference to my solution was I had to modify the runtimes.rb file found under the execjs-2.0.2 directory. In the comments of StackExchange someone tries to correct it and say it should be runtime.rb. That lead me down a path that didn't solve the problem. But the original answer leads you to

"C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\execjs-1.4.0\lib\execjs\ru??ntimes.rb"

when it should be

"C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\execjs-2.0.2\lib\execjs\ru??ntimes.rb"

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Michael, Try installing Node from http://nodejs.org/ and see if that fixes it. That seems to happen on Windows sometimes.

Michael Bedran
Michael Bedran
1,117 Points

Thanks Jason, everything is working now!

Timothy Chan
Timothy Chan
3,715 Points

Running into the same issue with Win8 Pro x64...installing nodejs is not helping. Any other ideas?

ExecJS::RuntimeError in Statuses#index

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

(in C:/Sites/treebook/app/assets/javascripts/statuses.js.coffee)

Faced the same issue.

Solution - Installed node from http://nodejs.org/ (Installation location - C:\Program Files\Nodejs)

  • Added NodeJS to the PATH environment variable.

(In command prompt) set PATH=%PATH%;C:\Program Files\Nodejs

Thijs Oude Avenhuis
Thijs Oude Avenhuis
11,924 Points

many thanks had the same problem but it's working now because of your advise.

Cheers!!

Glad it helped! :)

John Oleksowicz
John Oleksowicz
922 Points

Just stopping in to say thanks as well. This fixed the exact same problem I was having!