YAML and mod_ruby

Here’s a small puzzle.

I take a working .rbx and I do a require ‘yaml’ near the top.

Now it fails.

Error shown below.

Ideas??

Thanks,
Hal

/usr/local/lib/ruby/1.8/date.rb:238: warning: already initialized
constant MONTHNAMES
/usr/local/lib/ruby/1.8/date.rb:243: warning: already initialized
constant DAYNAMES
/usr/local/lib/ruby/1.8/date.rb:247: warning: already initialized
constant ABBR_MONTHNAMES
/usr/local/lib/ruby/1.8/date.rb:250: warning: already initialized
constant ABBR_DAYNAMES
/usr/local/lib/ruby/1.8/date.rb:254: warning: already initialized
constant ITALY
/usr/local/lib/ruby/1.8/date.rb:258: warning: already initialized
constant ENGLAND
/usr/local/lib/ruby/1.8/date.rb:262: warning: already initialized
constant JULIAN
/usr/local/lib/ruby/1.8/date.rb:266: warning: already initialized
constant GREGORIAN
[Thu May 20 10:52:30 2004] [error] mod_ruby: error in ruby
/usr/local/lib/ruby/1.8/date.rb:1259:in undef_method': undefined methodtoday’ for DateTime' (NameError) from /usr/local/lib/ruby/1.8/date.rb:1259 from /usr/local/lib/ruby/1.8/auto-reload.rb:60:inload’
from /usr/local/lib/ruby/1.8/auto-reload.rb:60:in require' from /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:2 from /usr/local/lib/ruby/1.8/auto-reload.rb:60:inload’
from /usr/local/lib/ruby/1.8/auto-reload.rb:60:in require' from /usr/local/lib/ruby/1.8/yaml.rb:198 from /usr/local/lib/ruby/1.8/auto-reload.rb:60:inload’
from /usr/local/lib/ruby/1.8/auto-reload.rb:60:in require' from /home/hal/www/rubymail/hal/rmail.rbx:21 from /usr/local/lib/ruby/1.8/apache/ruby-run.rb:70:inload’
from /usr/local/lib/ruby/1.8/apache/ruby-run.rb:70:in `handler’

Hal Fulton wrote:

Here’s a small puzzle.

I take a working .rbx and I do a require ‘yaml’ near the top.

Now it fails.

I can’t explain exactly why this is happening, but I’m removing the
require ‘date’ at the top of lib/yaml/rubytypes.rb. This module is
conditionally loaded in ext/syck/rubyext.c now. For now, you should be
able to remove the line and – though it’s hard to say without really
looking into auto-reload.rb – you should be okay.

_why