Topic: Nasty Problem

Anyone have an idea why my site won't boot anymore?

undefined method `new_record?' for nil:NilClass
../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:128:in `load_target'
../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:29:in `respond_to?'
/usr/lib/ruby/1.8/pstore.rb:163:in `load'
/usr/lib/ruby/1.8/pstore.rb:163:in `load'
/usr/lib/ruby/1.8/pstore.rb:118:in `transaction'
/usr/lib/ruby/1.8/cgi/session/pstore.rb:71:in `initialize'
/usr/lib/ruby/1.8/cgi/session.rb:273:in `new'
/usr/lib/ruby/1.8/cgi/session.rb:273:in `initialize'
../config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:112:in `new'
../config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:112:in `session'
../config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:108:in `stale_session_check!'
../config/../vendor/rails/actionpack/lib/action_controller/cgi_process.rb:108:in `session'
../config/../vendor/rails/actionpack/lib/action_controller/base.rb:937:in `assign_shortcuts_without_flash'
../config/../vendor/rails/actionpack/lib/action_controller/flash.rb:139:in `assign_shortcuts'
../config/../vendor/rails/actionpack/lib/action_controller/base.rb:402:in `process_without_filters'
../config/../vendor/rails/actionpack/lib/action_controller/filters.rb:372:in `process_without_session_management_support'
../config/../vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in `process'
../config/../vendor/rails/actionpack/lib/action_controller/base.rb:319:in `process'
../config/../vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:150:in `process_request'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `each_cgi'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
../config/../vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
dispatch.fcgi:16

Re: Nasty Problem

Sorry have no idea what this means. But with all the cgi and fcgi stuff I'm seeing, maybe you should move to mongrel.

Re: Nasty Problem

Yeah, I really want to.  I've got a client on DreamHost so I'm stuck with their buggy lighttpd configuration.

Re: Nasty Problem

Does script/console work?

Railscasts - Free Ruby on Rails Screencasts

Re: Nasty Problem

In the heat of the moments (production site currently down) I completely forgot about the console.  I've narrowed it down to something that's happening only to certain sessions (I think a particular user type).

I'll let y'all know if I figure anything out.  It's just that I've never had an error with pstore.rb before.

Re: Nasty Problem

Hmmm, purely a session issue.  I cleared out ./tmp/sessions/ (should apologize now to the affected users) and had to login again - everything worked fine.

Go figure.  Well, I'm glad it was so easily solved.