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
darren bryan
Courses Plus Student 276 PointsProblem after creating status
When I visit http://127.0.0.1:3000/statuses/ like the video tells me to I receive the error below
Winodws 8
ExecJS::RuntimeError in Statuses#index
Showing C:/Sites/project3/app/views/layouts/application.html.erb where line #6 raised:
(in C:/Sites/project3/app/assets/javascripts/statuses.js.coffee) Extracted source (around line #6):
3: <head> 4: <title>Project3</title> 5: <%= stylesheet_link_tag "application", :media => "all" %> 6: <%= javascript_include_tag "application" %> 7: <%= csrf_meta_tags %> 8: </head> 9: <body> Rails.root: C:/Sites/project3
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in _app_views_layouts_application_html_erb___671320100_26678628'
app/controllers/statuses_controller.rb:7:inindex'
Request
Parameters:
7 Answers
Mike Gabriel
8,402 PointsIt looks like you've got an error in your C:/Sites/project3/app/assets/javascripts/statuses.js.coffee file.
Can you post the contents of it?
darren bryan
Courses Plus Student 276 PointsPlace all the behaviors and hooks related to the matching controller here.
All this logic will automatically be available in application.js.
You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
Mike Gabriel
8,402 PointsJust to confirm, all 3 of those lines should have a hash # sign in front of them to denote a comment, correct?
Depending on where you are in the Treebook lesson, your file should look similar to this:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$ ->
$('.status').hover (event) ->
$(this).toggleClass("hover")
darren bryan
Courses Plus Student 276 Pointscorrect didn't copy over. I am not too far in. Just the first video right after install. I've been having problem after problem. But this is literally like 2-3 minutes in.
Jason Seifer
Treehouse Guest TeacherHi Darren, are you on Windows by any chance? If so, try downloading node.js and and then restart your sever and see if that helps - http://nodejs.org/download/.
darren bryan
Courses Plus Student 276 PointsThank you so much! Nodejs fixed my problem.
Andy Dietler
791 PointsI had this same problem. I'm also running Windows. I installed node.js and restarted and still no help.
My status.js.coffee file just has the first 3 lines, none of the hover stuff.
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
Behfar Bastani
3,609 PointsI am having the same problem: on Win 8.1, installed node.js, but only see above three commented lines in the statuses.js.coffee file.
UPDATE:
Issues resolved by restarting Win 8.1 machine after installation on node.js.