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 trialMichael Bedran
1,117 PointsRuby 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
3,715 PointsSolved.
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
Courses Plus Student 3,725 PointsI 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
Treehouse Guest TeacherHey Michael, Try installing Node from http://nodejs.org/ and see if that fixes it. That seems to happen on Windows sometimes.
Michael Bedran
1,117 PointsThanks Jason, everything is working now!
Timothy Chan
3,715 PointsRunning 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)
shishirkinkar
1,212 PointsFaced 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
11,924 Pointsmany thanks had the same problem but it's working now because of your advise.
Cheers!!
shishirkinkar
1,212 PointsGlad it helped! :)
John Oleksowicz
922 PointsJust stopping in to say thanks as well. This fixed the exact same problem I was having!
Elijah Gartin
13,182 PointsElijah Gartin
13,182 PointsThank you!