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

4 errors occurred on the lecture, 'Before Filters'

I unfortunately still have 4 errors although I did 'rake db:test:prepare'.

seodongju@Seoui-MacBook-Pro ~/Desktop/Projects/treebook$ ruby -Itest     test/functional/statuses_controller_test.rb Run options:

Running tests:
[1/7] StatusesControllerTest#testshould_create_status = 0.03 s 1) Error:         test_should_create_status(StatusesControllerTest): NoMethodError: undefined method name' for #    <Status:0x007fa14bd24eb8> /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activemodel-    3.2.13/lib/active_model/attribute_methods.rb:407:inmethod_missing' /usr/local/rvm/gems/ruby-2.0.0-    p247/gems/activerecord-3.2.13/lib/active_record/attribute_methods.rb:149:in method_missing'     test/functional/statuses_controller_test.rb:22:inblock (2 levels) in class:StatusesControllerTest'     /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-    3.2.13/lib/active_support/testing/assertions.rb:55:in assert_difference'     test/functional/statuses_controller_test.rb:21:inblock in class:StatusesControllerTest'     /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1301:in run' /usr/local/rvm/rubies/ruby-    2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:17:inrun' /usr/local/rvm/gems/ruby-2.0.0-    p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:36:in block in run'         /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-    3.2.13/lib/active_support/callbacks.rb:491:in_run277292093199720170setup4128739567922393729_callbac    ks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in     __run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-    3.2.13/lib/active_support/callbacks.rb:385:in_run_setup_callbacks' /usr/local/rvm/gems/ruby-2.0.0-    p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in run_callbacks'     /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-    3.2.13/lib/active_support/testing/setup_and_teardown.rb:35:inrun' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/minitest/unit.rb:912:inmap' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/test/unit.rb:657:inblock in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/test/unit.rb:655:in each' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/test/unit.rb:655:in_run_suites' /usr/local/rvm/rubies/ruby-2.0.0-    p247/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:21:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:774:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:366:in block (2 levels) in autorun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:27:inrun_once' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'

[4/7] StatusesControllerTest#testshould_get_index = 0.01 s
2) Error: test_should_get_index(StatusesControllerTest): ActionView::Template::Error: undefined method     full_name' for nil:NilClass     /Users/seodongju/Desktop/Projects/treebook/app/views/statuses/index.html.erb:9:inblock in     _app_views_statuses_index_html_erb578006315948003850_70165369943740'     /Users/seodongju/Desktop/Projects/treebook/app/views/statuses/index.html.erb:7:in each'     /Users/seodongju/Desktop/Projects/treebook/app/views/statuses/index.html.erb:7:in_app_views_statuses_in    dex_html_erb578006315948003850_70165369943740' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in block in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument'     /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-    3.2.13/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:47:inblock (2 levels) in render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in block in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:46:inblock in render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:54:in render_with_layout' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:45:inrender_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:18:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:36:inrender_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:17:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:110:in_render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/streaming.rb:225:in _render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:103:inrender_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/renderers.rb:28:in render_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/compatibility.rb:50:inrender_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:88:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:16:inrender' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:in block (2 levels) in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:inblock in ms' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in realtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:inms' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:in block in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:83:incleanup_view_runtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:24:in cleanup_view_runtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:39:inrender' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:10:in default_render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/mime_responds.rb:196:inrespond_to' /Users/seodongju/Desktop/Projects/treebook/app/controllers/statuses_controller.rb:8:in index' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:insend_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:in block in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:414:in_run2725796606113865521process_action3008371483746218400callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/activesupport/callbacks.rb:405:in __run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in run_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in block in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:inprocess' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/testing.rb:17:in process_with_new_base_test' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:475:inprocess' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:49:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:19:inblock in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:72:in catch' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:72:in_catch_warden' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:19:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:392:inget' test/functional/statuses_controller_test.rb:9:in block in <class:StatusesControllerTest>' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:17:in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:36:inblock in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:491:in `_run277292093199720170setup4128739567922393729_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `_run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:35:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:919:inblock in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:in map' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:in_run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:657:in block in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:ineach' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:867:in_run_anything' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1060:in run_tests' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1047:inblock in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in each' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in_run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1035:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:21:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:774:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:366:inblock (2 levels) in autorun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:27:in run_once' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:365:inblock in autorun'

[6/7] StatusesControllerTest#testshould_show_status = 0.01 s
3) Error: test_should_show_status(StatusesControllerTest): ActionView::Template::Error: undefined method     full_name' for nil:NilClass /Users/seodongju/Desktop/Projects/treebook/app/views/statuses/show.html.erb:5:in_app_views_statuses_show_html_erb789208834568090362_70165378938880' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/template.rb:145:in block in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/template.rb:143:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:47:inblock (2 levels) in render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in block in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/abstract_renderer.rb:38:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:46:inblock in render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:54:in render_with_layout' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:45:inrender_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/template_renderer.rb:18:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:36:inrender_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_view/renderer/renderer.rb:17:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:110:in_render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/streaming.rb:225:in _render_template' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:103:inrender_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/renderers.rb:28:in render_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/compatibility.rb:50:inrender_to_body' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:88:in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:16:inrender' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:in block (2 levels) in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:inblock in ms' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/benchmark.rb:296:in realtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/core_ext/benchmark.rb:5:inms' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:40:in block in render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:83:incleanup_view_runtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:24:in cleanup_view_runtime' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:39:inrender' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:10:in default_render' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/mime_responds.rb:196:inrespond_to' /Users/seodongju/Desktop/Projects/treebook/app/controllers/statuses_controller.rb:19:in show' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:insend_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:in block in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:414:in_run2725796606113865521process_action623283010601100494callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/activesupport/callbacks.rb:405:in __run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in_run_process_action_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in run_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:inblock in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in block in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in instrument' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:in process_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:inprocess_action' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:inprocess' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/testing.rb:17:in process_with_new_base_test' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:475:inprocess' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:49:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:19:inblock in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:72:in catch' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:72:in_catch_warden' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/devise-2.2.4/lib/devise/test_helpers.rb:19:in process' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/test_case.rb:392:inget' test/functional/statuses_controller_test.rb:29:in block in <class:StatusesControllerTest>' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1301:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:17:in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:36:inblock in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:491:in `_run277292093199720170setup4128739567922393729_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in _run_setup_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:35:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:919:inblock in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:in map' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:in_run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:657:in block in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:ineach' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:867:in_run_anything' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1060:in run_tests' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1047:inblock in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in each' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in_run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1035:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:21:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:774:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:366:inblock (2 levels) in autorun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:27:in run_once' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:365:inblock in autorun'

[7/7] StatusesControllerTest#testshould_update_status = 0.00 s
4) Error: test_should_update_status(StatusesControllerTest): NoMethodError: undefined method name' for     #<Status:0x007fa14d071d68> /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activemodel-    3.2.13/lib/active_model/attribute_methods.rb:407:inmethod_missing' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/attribute_methods.rb:149:in method_missing' test/functional/statuses_controller_test.rb:39:inblock in class:StatusesControllerTest' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1301:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit/testcase.rb:17:inrun' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:36:in block in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:491:in_run277292093199720170setup4128739567922393729_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in __run_callback' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in_run_setup_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in run_callbacks' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/testing/setup_and_teardown.rb:35:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:919:in block in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:inmap' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:912:in _run_suite' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:657:inblock in _run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:in each' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:655:in_run_suites' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:867:in _run_anything' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1060:inrun_tests' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1047:in block in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:ineach' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1046:in _run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/minitest/unit.rb:1035:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:21:in run' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:774:inrun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:366:in block (2 levels) in autorun' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:27:inrun_once' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit.rb:365:in `block in autorun'

Finished tests in 0.204404s, 34.2459 tests/s, 24.4614 assertions/s. 7 tests, 5 assertions, 0 failures, 4 errors, 0 skips

Jason Seifer(Staff) answered like below...

Hey Dongju Seo you may need to associate the statuses with a user. Try opening up a console and doing the following:

Status.where(:user_id, nil).all.each{|s| s.update_attribute(:user_id, User.first.id)

But my console gave like this...

seodongju@Seoui-MacBook-Pro ~/Desktop/Projects/treebook$ rails console Loading     development environment (Rails 3.2.13) 2.0.0-p247 :001 > Status.where(:user_id,     nil).all.each{|s| s.update_attribute(:user_id, User.first.id)} Status Load (0.1ms) SELECT     "statuses".* FROM "statuses" WHERE ('user_id') => []

They returned [].

1 Answer

Alan Johnson
Alan Johnson
7,625 Points

Can you zip up your project and share it with us all? That'll help us figure out what's up. If you want you could just create a gist containing your schema.rb, status.rb, statuses/show.html.erb, and statuses_controller_test.rb.

Thanks!

Alan Johnson
Alan Johnson
7,625 Points

Can you post statuses_controller.rb too? I'm getting closer on understanding what's up!