YAML and mod_ruby

Discussion in 'Ruby' started by Hal Fulton, May 20, 2004.

  1. Hal Fulton

    Hal Fulton Guest

    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'
    Hal Fulton, May 20, 2004
    #1
    1. Advertising

  2. 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
    why the lucky stiff, May 20, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RubyQuestions
    Replies:
    0
    Views:
    219
    RubyQuestions
    Dec 3, 2003
  2. Robert McKinnon
    Replies:
    1
    Views:
    167
    Dave Thomas
    Mar 6, 2004
  3. Paul Battley

    YAML.dump/YAML.load bug

    Paul Battley, Aug 3, 2005, in forum: Ruby
    Replies:
    0
    Views:
    176
    Paul Battley
    Aug 3, 2005
  4. Eric Promislow
    Replies:
    4
    Views:
    204
    Eric Promislow
    Oct 31, 2006
  5. Joshua Choi

    yaml.rb and YAML "%" directives

    Joshua Choi, Jan 14, 2007, in forum: Ruby
    Replies:
    1
    Views:
    160
Loading...

Share This Page