YAML on OS X Leopard

I’m using Leopard and it has a decent Ruby installation, so I haven’t
bothered with MacPorts. Used gems to install Rails.

However when I go in to IRB and type:
require ‘yaml’

I always get ‘false’. What do I have to do to get it to work?

Best regards

Gabriel

Gabriel D. wrote:

I’m using Leopard and it has a decent Ruby installation, so I haven’t
bothered with MacPorts. Used gems to install Rails.

However when I go in to IRB and type:
require ‘yaml’

I always get ‘false’. What do I have to do to get it to work?

Best regards

Gabriel

Nothing. When require returns “false” it means that yaml was already
loaded. If yaml could not be loaded require would have raised LoadError.

Gabriel D. wrote:

I’m using Leopard and it has a decent Ruby installation, so I haven’t
bothered with MacPorts. Used gems to install Rails.

However when I go in to IRB and type:
require ‘yaml’

I always get ‘false’. What do I have to do to get it to work?
That just means it’s already been required, and didn’t load again. You
should just be able to use it.

Gabriel D. wrote:

I’m using Leopard and it has a decent Ruby installation, so I haven’t
bothered with MacPorts. Used gems to install Rails.

However when I go in to IRB and type:
require ‘yaml’

I always get ‘false’. What do I have to do to get it to work?

I think it just means that it’s already loaded, so there was no need to
load it again.

mortee

Hi!

[email protected] wrote:

I’m using Leopard and it has a decent Ruby installation, so I haven’t
bothered with MacPorts. Used gems to install Rails.

However when I go in to IRB and type:
require ‘yaml’

I always get ‘false’. What do I have to do to get it to work?

It seems to me that yaml is loaded with rubygems, at least on my
linux box:

echo $RUBYOPT

-rauto_gem -Ku -rubygems

ruby -e ‘puts($LOADED_FEATURES.select {|f| /yaml/ =~ f }.sort)’

yaml.rb
yaml/basenode.rb
yaml/constants.rb
yaml/error.rb
yaml/rubytypes.rb
yaml/stream.rb
yaml/syck.rb
yaml/tag.rb
yaml/types.rb
yaml/ypath.rb

unset RUBYOPT

ruby -e ‘puts($LOADED_FEATURES.select {|f| /yaml/ =~ f }.sort)’

(no output)

I’m using ruby 1.8.6 on Gentoo/Linux.

Daniel