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!

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


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

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


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