Despite switching to mod_fcgid (which has improved performance),
sessions are still expiring sporadically. I thought I might try
switching to storing them in the db, but I get the following error when
I try to run the rake create_sessions_table command
D:\User\Code\ruby\prometheus>rake create_sessions_table
(in D:/User/Code/ruby/prometheus)
rake aborted!
undefined local variable or method `acts_as_versioned’ for Record:Class
I have the acts_as_versioned gem, and my whole app runs fine. If I
comment out the acts_as_versioned line in Record, another gem is not
recognized.
Interesting. So I tried the same on my debian box, and the session table
got created okay, but then when I tried to run the app configured for
active record sessions I got the following error in my apache log:
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:991:in method_missing': undefined local variable or methodacts_as_versioned’
for Record:Class (NameError)
from
/var/www/ruby/srjoseph/prometheus/public/…/config/…/app/models/record.rb:10
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:207:in load' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:39:inrequire_or_load’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:22:in depend_on' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:30:inassociate_with’
from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:179:in require_association' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations.rb:780:inrequire_association_class’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations.rb:650:in has_and_belongs_to_many_without_reflection' ... 39 levels... from /var/www/ruby/srjoseph/prometheus/public/../config/environment.rb:41 from /usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:40:inrun’
from
/var/www/ruby/srjoseph/prometheus/public/…/config/environment.rb:11
from /var/www/ruby/srjoseph/prometheus/public/dispatch.fcgi:21
[Thu Apr 06 22:19:48 2006] [error] [client 72.235.109.52] Premature end
of script headers: dispatch.fcgi
Before you ask, yes the acts_as_versioned gem is on my debian box, and
the whole app runs just fine when I’m not trying to use activerecord
sessions.
So I guess gems are just incompatible with active record store sessions?