Skip to content

Instantly share code, notes, and snippets.

@mwilc0x
Created January 15, 2011 18:10
Show Gist options
  • Save mwilc0x/781102 to your computer and use it in GitHub Desktop.
Save mwilc0x/781102 to your computer and use it in GitHub Desktop.
NoMethodError in Wiki#index
Showing layouts/wiki.rhtml where line #9 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]
Extracted source (around line #9):
6: </head>
7: <body>
8: <div id="wikipagebody">
9: <% if @flash[:notice] %>
10: <div id="flash"><%= flash[:notice] %></div>
11: <% end %>
12: <%= yield %>
RAILS_ROOT: C:/Users/Mike/railsApps/wiki
Application Trace | Framework Trace | Full Trace
app/views/layouts/wiki.rhtml:9:in `_run_erb_47app47views47layouts47wiki46rhtml'
app/controllers/wiki_controller.rb:9:in `index'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:342:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:342:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template_handlers/compilable.rb:29:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template_handlers/compilable.rb:29:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:35:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:22:in `render_template'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:248:in `render_file'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/layout.rb:257:in `render_without_benchmark'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:51:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:51:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `perform_action_without_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:579:in `call_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/query_cache.rb:8:in `cache'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `process_without_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:130:in `process'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:389:in `process'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:149:in `handle_request'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:112:in `handle_dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:78:in `service'
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:62:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/servers/webrick.rb:66
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/server.rb:39
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
script/server:3
app/views/layouts/wiki.rhtml:9:in `_run_erb_47app47views47layouts47wiki46rhtml'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:342:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:342:in `execute'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template_handlers/compilable.rb:29:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template_handlers/compilable.rb:29:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:35:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/template.rb:22:in `render_template'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_view/base.rb:248:in `render_file'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/layout.rb:257:in `render_without_benchmark'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:51:in `render'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/wiki_controller.rb:9:in `index'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:1166:in `perform_action_without_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:579:in `call_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:293:in `measure'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
C:/Ruby187/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/query_cache.rb:8:in `cache'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `send'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:529:in `process_without_filters'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/session_management.rb:130:in `process'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/base.rb:389:in `process'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:149:in `handle_request'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:107:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `synchronize'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:104:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/action_controller/dispatcher.rb:35:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:112:in `handle_dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:78:in `service'
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/webrick_server.rb:62:in `dispatch'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/servers/webrick.rb:66
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in'
C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
C:/Ruby187/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/server.rb:39
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
script/server:3
Request
Parameters:
None
Show session dump
---
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers:
{"Status"=>"200 OK",
"cookie"=>[],
"Cache-Control"=>"no-cache"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment