irb: require returns false?

M

Mike Carbs

hey everyone (ruby n00b here),

I am trying to compile ruby 1.8.6-p287. I built it using:

/configure --prefix=/usr/local/ruby --enable-pthread --enable-shared

I was playing with how support for things like iconv, gdbm, openssl, etc
worked and did:

irb(main):001:0> require 'gdbm'
LoadError: no such file to load -- gdbm
from (irb):1:in `require'
from (irb):1

so I installed the gdbm devel libs, and did recompiled. Now I get:

irb(main):004:0> require 'gdbm'
=> false

When I use Redhats stock 1.8.5 rpm, I get:

irb(main):001:0> require 'gdbm'
=> true

So my question is... what does "false" mean? The first time I tried, it
complained about not being able to load the file. After installing the
devel package, it now just says false. Does this mean that it properly
loading it but just not enabling it somehow?

Can someone shed some light on this for me?

Thanks!
 
J

Jakub Pavlík jn.

When require returns false it means that the library has already been required.
(At least I don't know any other case...)
 

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,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top