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 Build a Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

Unable to view the statuses

I am following along the tutorials and did the following command

rails generate scaffold status name:string content:text
rake db:migrate

Now I am getting this error at localhost:3000/statuses

ExecJS::ProgramError in Statuses#index
Showing C:/treebook/app/views/layouts/application.html.erb where line #6 raised:

TypeError: Object doesn't support this property or method
Rails.root: C:/treebook

Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___1036767704_39612708'
Request

Parameters:

None
Toggle session dump
Toggle env dump
Response
David Acosta
David Acosta
679 Points

I'm also getting the same error

1 Answer

David Acosta
David Acosta
679 Points

I was able to figure it out. What you want to do is go to the app > controllers folder. Then, navigate to the new controller that was created in the video, which is the statuses controller. Before all of the code that was generated, type the following: layout false Save, run server, then give it a try. Worked for me.

Ram Iyer
Ram Iyer
9,116 Points

Thanks! Worked for me too!