YAML and mod_ruby

H

Hal Fulton

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 method
`today' for `DateTime' (NameError)
from /usr/local/lib/ruby/1.8/date.rb:1259
from /usr/local/lib/ruby/1.8/auto-reload.rb:60:in `load'
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:in `load'
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:in `load'
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:in `load'
from /usr/local/lib/ruby/1.8/apache/ruby-run.rb:70:in `handler'
 
W

why the lucky stiff

Hal said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top