Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Julian McNeill
Julian McNeill
9,444 Points

Error on "Creating Relationships" code help

I'm getting this error but I've entered everything right

Showing C:/Users/Julian/treebook/app/views/statuses/index.html.erb where line #9 raised:

undefined method `full_name' for nil:NilClass Extracted source (around line #9):

6: 7: <% @statuses.each do |status| %> 8: <div class="status"> 9: <strong><%= status.user.full_name %></strong> 10: <p><%= status.content %></p> 11: <div class="meta"> 12: <%= link_to time_ago_in_words(status.created_at) + " ago", status %> Rails.root: C:/Users/Julian/treebook

Application Trace | Framework Trace | Full Trace app/views/statuses/index.html.erb:9:in block in _app_views_statuses_index_html_erb___267842439_33949212' app/views/statuses/index.html.erb:7:ineach' app/views/statuses/index.html.erb:7:in _app_views_statuses_index_html_erb___267842439_33949212' app/controllers/statuses_controller.rb:7:inindex'

Julian McNeill
Julian McNeill
9,444 Points

why am i getting an error on line 9

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Sorry for the trouble! Jim fixes that issue in the following video:

http://teamtreehouse.com/library/programming-2/build-a-simple-version-of-facebook/customizing-forms/getting-the-latest-changes

Try following along there and let us know if you still have problems.