YAML Library not recognized

A

Ahmed Hashim

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.
 
E

Eugene Bolshakov

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.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top