YAML on OS X Leopard

G

gabe

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
 
A

alex

Gabriel said:
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.
 
R

rmagick

Gabriel said:
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.
 
M

mortee.lists

Gabriel said:
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
 
D

Daniel Schömer

Hi!

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
 

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

Forum statistics

Threads
474,270
Messages
2,571,341
Members
48,031
Latest member
rashmi16

Latest Threads

Top