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 trialMatthew McLennan
10,315 PointsExecJS::RuntimeError in Statuses#index
I'm on a Windows 8 PC. I get this error in the middle of the Ruby "Generate Rails Application" when I type statuses after localhost:3000.
Has anyone else experienced this?
7 Answers
Matthew McLennan
10,315 PointsGot it! Open up treebook\assets\javascripts\application.js
Delete //=require_tree at the bottom of the document.
Dan Browning
1,038 PointsThanks a lot - fixed my problem. :)
Thomas Fallaize
3,493 Pointsfantastic, thank you.
Oli Chen
727 PointsFIxed! Thanks
Michael Lerner
1,804 PointsRemoving //=require_tree caused other issues to occur. This is what worked for me:
http://stackoverflow.com/questions/13530042/execjsruntimeerror-in-usersindex-ror
Hannah McFarlane
2,810 PointsThis worked perfectly for me, too.
Timothy Chan
3,715 PointsThis did not work for me. Still running into problems.
Other thread I'm looking at which also did not work by installing nodejs: http://teamtreehouse.com/forum/ruby-status-issue
Timothy Chan
3,715 PointsSolved. Solution (at least for me) is posted here http://teamtreehouse.com/forum/ruby-status-issue
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"
Oliver Gibbs
9,771 PointsThanks for that, the //=require_tree solution above worked for me. For those that are ahead/finished in the Rails course from this question, how are you finding it using Windows? I'm on Windows 8 and as the lessons are done on a Mac I wondered if these problems are going to keep happening. This four minute video has taken me 20 minutes to get through and I'm wondering if I should just start borrowing my wifes Macbook for this. Thoughts?
Olatunde Alegbe
1,177 PointsNo very little about coding. Playing around with Rails. This is how you solve it. If I can anyone can ;-)!
https://github.com/sstephenson/execjs/issues/81#issuecomment-9892952
Jose Salazar
1,007 PointsJose Salazar
1,007 PointsIn my case deleting the //=require_tree did not solve my problem and i also tried other suggestions and no luck. After a couple of minutes i found that by deleting the <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> in /app/view/layouts/application.htlm.erb it solved my problem.