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

Julian McNeill
Julian McNeill
9,445 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,445 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.