I''ve got a Rails project that has been on the shelf for a few months,
and I''m picking it back up. I''ve frozen Rails at 1.1.4 in
vendor/,
and did the "rails ." and "rake rails:update" to get it up
to a
current Rails level.
The code initially seems to be working fine, but when I go to my
login method, I get a 500 error thrown. Looking in the
development.log, it seems that it''s a problem with a "sweep"
getting
called on a nil. However, I can''t for the life of me figure out what
its problem is.
Here''s the chunk from the log:
####
Processing AccountController#login (for 74.239.172.234 at 2006-07-11
12:29:15) [
POST]
Session ID: a129e22b0d979a5e287c2bdf3c662916
Parameters: {"action"=>"login",
"username"=>"Lunenburg",
"controller"=>"account",
"password"=>"XXXXX"}
^[[4;35;1mPreference Columns (0.000231)^[[0m ^[[0mSHOW FIELDS
FROM preferences^[[0m
^[[4;36;1mPreference Load (0.000177)^[[0m ^[[0;1mSELECT * FROM
preferences W
HERE (username = ''Lunenburg'') LIMIT 1^[[0m
DEBUG: Setting session pref to #<Preference:0x8f43e38>
DEBUG: Set session pref to #<Preference:0x8f43e38>
Redirected to http://carlton.skiltech.com:3000/forum/jump/0
Completed in 3.25367 (0 reqs/sec) | DB: 0.00041 (0%) | 302 Found
[http://carlton.skiltech.com/account/login]
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.sweep^M
/usr/home/minter/rails/iscaweb/config/../vendor/rails/actionpack/lib/
action_cont
roller/flash.rb:144:in `process_cleanup_without_filters''^M
/usr/home/minter/rails/iscaweb/config/../vendor/rails/actionpack/lib/
action_cont
roller/filters.rb:434:in
`process_cleanup_without_session_management_support''^M
/usr/home/minter/rails/iscaweb/config/../vendor/rails/actionpack/lib/
action_cont
roller/session_management.rb:123:in
`process_cleanup_without_components''^M
...
###
Thinking it was some caching issue, I set
ActionController::Base.perform_caching = false in my environment.rb,
with no luck.
I realize it''s kind of vague, but does anyone have any suggestions on
where to look to find out why I''m getting a "nil.sweep" in my
code?
--Wade