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

Rodrigo Giust
Rodrigo Giust
5,179 Points

undefined method 'full_name' for nil:NilClass

Hello all, I am a real Ruby newbie, but I was trying the guide and while doing the "Testing the Whole App" videos, after the "Before Filter" video, while Jason got no errors running the test, I had one, the whole error is this:

1) Error: test_should_get_index(StatusesControllerTest): ActionView::Template::Error: undefined method full_name' for nil:NilClass C:/Sites/Projects/treebook/app/views/statuses/index.html.erb:9:inblock in app_views_statuses_index_html_erb523694_42961500' C:/Sites/Projects/treebook/app/views/statuses/index.html.erb:7:in each' C:/Sites/Projects/treebook/app/views/statuses/index.html.erb:7:in_app_view s_statuses_index_html_erb_523694_42961500' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/template.rb:145:in block in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications.rb:123:inblock in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications/instrumenter.rb:20:in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications.rb:123:ininstrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/template.rb:143:in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/template_renderer.rb:47:inblock (2 levels) in render_templ ate' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/abstract_renderer.rb:38:in block in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications.rb:123:inblock in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications/instrumenter.rb:20:in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/notifications.rb:123:ininstrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/abstract_renderer.rb:38:in instrument' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/template_renderer.rb:46:inblock in render_template' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/template_renderer.rb:54:in render_with_layout' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/template_renderer.rb:45:inrender_template' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/template_renderer.rb:18:in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/renderer.rb:36:inrender_template' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_view/renderer/renderer.rb:17:in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a bstract_controller/rendering.rb:110:in_render_template' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_controller/metal/streaming.rb:225:in _render_template' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a bstract_controller/rendering.rb:103:inrender_to_body' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_controller/metal/renderers.rb:28:in render_to_body' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_controller/metal/compatibility.rb:50:inrender_to_body' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a bstract_controller/rendering.rb:88:in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_controller/metal/rendering.rb:16:inrender' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.13/lib/a ction_controller/metal/instrumentation.rb:40:in block (2 levels) in render' C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/li b/active_support/core_ext/benchmark.rb:5:inblock in ms'

8 tests, 10 assertions, 0 failures, 1 errors, 0 skips

Any help will be appreaciated. Thank you