NoMethodError (undefined method `[]'' for nil:NilClass)

Gavin Sinclair
Thu, 05 May 2005 02:00:52 -0000

I''ve got this error suddenly cropping up.  The relevant bit of
development.log is reproduced below.  What can I learn from it?  My
problem is that none of _my_ code is mentioned in the stack trace.

Any help appreciated.

Thanks,
Gavin

--------------- development.log:

Processing Base#index (for 127.0.0.1 at Thu May 05 11:54:33 AUS Eastern Standard
Time 2005)
  Parameters: {"action"=>"index",
"controller"=>"portal"}

NoMethodError (undefined method `[]'' for nil:NilClass):
    D:/Software/ruby/lib/ruby/1.8/cgi/session.rb:291:in `[]''

D:/Software/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/cgi_process.rb:81:in
`session''

D:/Software/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:681:in
`assign_shortcuts''

D:/Software/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:326:in
`process''

D:/Software/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/base.rb:273:in
`process''
    D:/Software/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/dispatcher.rb:32:in
`dispatch''
    D:/home/gavin/Projects/CrapCollector/public/dispatch.rb:10

D:/Software/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/dependencies.rb:187:in
`load''

D:/Software/ruby/lib/ruby/gems/1.8/gems/activesupport-1.0.3/lib/active_support/dependencies.rb:187:in
`load''

D:/Software/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:84:in
`handle_dispatch''

D:/Software/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:35:in
`do_GET''
    D:/Software/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`__send__''
    D:/Software/ruby/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in
`service''
    D:/Software/ruby/lib/ruby/1.8/webrick/httpserver.rb:92:in `service''
    D:/Software/ruby/lib/ruby/1.8/webrick/httpserver.rb:54:in `run''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:150:in
`start_thread''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:144:in
`start_thread''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
    D:/Software/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''

D:/Software/ruby/lib/ruby/gems/1.8/gems/rails-0.11.1/lib/webrick_server.rb:21:in
`dispatch''
    script/server:48

Rendering
D:/Software/ruby/lib/ruby/gems/1.8/gems/actionpack-1.7.0/lib/action_controller/templates/rescues/layout.rhtml
(500 Inter
nal Error)