YAML Library not recognized

Discussion in 'Ruby' started by Ahmed Hashim, Sep 12, 2007.

  1. Ahmed Hashim

    Ahmed Hashim Guest

    My setup:
    ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]

    So i compiled ruby from source and installed it on my system (ubuntu
    7.04), and was happy for a while. However i fired up irb one day and ran
    the following command:

    {}.to_yaml

    and i got the following error:

    NoMethodError: undefined method `to_yaml' for {}:Hash

    I then installed the yaml library from the synaptic package manager for
    ruby, and restarted my system. I still keep getting the same error.

    My hypothesis as to why this is happening is because when I compiled
    ruby, i added the "prefix=/usr/local" flag when i ran the config file,
    so it was installed to a different directory other than what synaptic
    would usually install it to. However, it still doesn't recognize the
    YAML library.

    I can't seem to figure out why there is no YAML library on my version of
    Ruby or how to install it. If anybody can help me out with this problem,
    i'd really appreciated it.
    --
    Posted via http://www.ruby-forum.com/.
     
    Ahmed Hashim, Sep 12, 2007
    #1
    1. Advertising

  2. Hi Ahmed :) and everyone

    Is there some kind of a config option that will auto require yaml lib?
    On windows
    {}.to_yaml works without requiring yaml in irb

    Many thanks
    Eugene.
     
    Eugene Bolshakov, Sep 12, 2007
    #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:
    241
    RubyQuestions
    Dec 3, 2003
  2. Paul Battley

    YAML.dump/YAML.load bug

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

    yaml.rb and YAML "%" directives

    Joshua Choi, Jan 14, 2007, in forum: Ruby
    Replies:
    1
    Views:
    191
  5. Fransiscus Xaverius

    YAML Problem YAML::Object

    Fransiscus Xaverius, Dec 14, 2007, in forum: Ruby
    Replies:
    2
    Views:
    166
    Fransiscus Xaverius
    Dec 14, 2007
Loading...

Share This Page