Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > YAML Library not recognized

Thread Tools

YAML Library not recognized

Ahmed Hashim
Posts: n/a
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:


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

Reply With Quote
Eugene Bolshakov
Posts: n/a
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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
YAML Problem YAML::Object Fransiscus Xaverius Ruby 2 12-14-2007 09:17 PM
yaml.rb and YAML "%" directives Joshua Choi Ruby 1 01-14-2007 07:53 AM
Puzzling over why ri can open the std ruby/ri .yaml files, but raw yaml can't Eric Promislow Ruby 4 10-31-2006 10:15 PM
YAML.dump/YAML.load bug Paul Battley Ruby 0 08-03-2005 08:28 PM
YAML Question: Using YAML::YamlNode#transform Method to get float values? RubyQuestions Ruby 0 12-03-2003 02:15 AM