Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > irb: require returns false?

Reply
Thread Tools

irb: require returns false?

 
 
Mike Carbs
Guest
Posts: n/a
 
      12-31-2008
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!
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Jakub Pavlík jn.
Guest
Posts: n/a
 
      12-31-2008
When require returns false it means that the library has already been required.
(At least I don't know any other case...)

> 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!
> --
> Posted via http://www.ruby-forum.com/.


--
"Configure complete, now type 'make' and PRAY."

(configure script of zsnes - www.zsnes.com)

 
Reply With Quote
 
 
 
Reply

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
cin - Why Does It Require 2 Returns? Mike Copeland C++ 26 08-26-2011 03:12 PM
cin - Why Does It Require 2 Returns? Mike Copeland C++ 1 08-21-2011 01:24 PM
Sorted Returns List and Reversed Returns Iterator ++imanshu Python 7 08-23-2008 04:25 AM
require 'socket' returns false in windows? David Miller Ruby 2 07-08-2008 09:26 PM
createImage sometime returns null and sometime returns non-null. vizlab Java 3 10-17-2007 11:21 AM



Advertisments