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

Problem after creating status

When I visit http://127.0.0.1:3000/statuses/ like the video tells me to I receive the error below

Video link: http://teamtreehouse.com/library/programming-2/build-a-simple-version-of-facebook/getting-started-with-rails/generate-a-rails-application

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

It 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?

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/

Just 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")

correct 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
STAFF
Jason Seifer
Treehouse Guest Teacher

Hi 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/.

Thank you so much! Nodejs fixed my problem.

I 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/

I 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.