irb: require returns false?

Discussion in 'Ruby' started by Mike Carbs, Dec 31, 2008.

  1. Mike Carbs

    Mike Carbs Guest

    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/.
     
    Mike Carbs, Dec 31, 2008
    #1
    1. Advertising

  2. 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)
     
    Jakub Pavlík jn., Dec 31, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DJ
    Replies:
    3
    Views:
    937
  2. Sam Stephenson
    Replies:
    1
    Views:
    229
    Andrew Walrond
    Jun 18, 2005
  3. Replies:
    1
    Views:
    162
    Florian Groß
    Oct 26, 2005
  4. anne001
    Replies:
    1
    Views:
    277
    anne001
    Jun 27, 2006
  5. Iñaki Baz Castillo
    Replies:
    9
    Views:
    197
    Igor Pirnovar
    Feb 26, 2009
Loading...

Share This Page