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

NoMethodError in Status#Show

So, like many other people have experienced, I've ran into the infamous NoMethoError with the error message "undefined method `first_name' for nil:NilClass"

I tried to follow the instruction on the following page but still cannot get rid of the error

https://teamtreehouse.com/forum/no-method-error-in-statusesshow

I've also tried to go into rail console and reset all User and Statuses, rake db:reset and then rake db:migrate. Still no use.

Any other tricks that I can use ?

1 Answer

Can you verify that when you create a status the appropriate user is assigned? It says nil on first_name because the status is not getting a user assigned to it.