finding ruby.h / problem with rbconfig (LoadError)

Discussion in 'Ruby' started by Oliver Obst, Sep 26, 2003.

  1. Oliver Obst

    Oliver Obst Guest

    Hi all,

    is there a generic way to find out where the ruby.h file is located?

    Until now I was using something like
    ruby -rrbconfig -e "print Config::CONFIG['archdir']

    which worked on the systems I have tested (with ruby 1.6.something
    preinstalled).

    The last check I did was with ruby 1.8.0 (compiled from sources), and I
    always get

    ruby: No such file to load -- rbconfig (LoadError)

    Am I doing something wrong here or is this just a ruby bug?

    cheers
    Oliver

    P.S.: my ruby 1.8.0 was configured with
    ../configure --prefix=/xxx/local --exec-prefix=/xxx/local/intel-linux
    because the filesystem is used by different OS/architectures

    --
    Oliver Obst 0261 287-2774 101% -- how much do you give?
    AI Research Group
    U Koblenz B219 https://www.uni-koblenz.de/~fruit/about/pgp.html
    Oliver Obst, Sep 26, 2003
    #1
    1. Advertising

  2. Oliver Obst

    ts Guest

    >>>>> "O" == Oliver Obst <> writes:

    O> Am I doing something wrong here or is this just a ruby bug?

    your installation is broken

    svg% ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'
    /usr/local/lib/ruby/1.8/i686-linux
    svg%

    svg% ruby -rrbconfig -e 'puts Dir[Config::CONFIG["archdir"]+"/rb*"]'
    /usr/local/lib/ruby/1.8/i686-linux/rbconfig.rb
    svg%


    Guy Decoux
    ts, Sep 26, 2003
    #2
    1. Advertising

  3. Oliver Obst

    Oliver Obst Guest

    ts wrote:

    >>>>>> "O" == Oliver Obst <> writes:

    >
    > O> Am I doing something wrong here or is this just a ruby bug?
    >
    > your installation is broken



    OK, knowing this alone doesn't help me really much. What I basically did was

    - downloading and unpacking the ruby sources
    - ./configure --prefix=/xxx/local --exec-prefix=/xxx/local/intel-linux
    - make
    - make install

    (every step worked with no error)

    what's wrong with that?

    cheers
    Oliver

    --
    Oliver Obst 0261 287-2774 101% -- how much do you give?
    AI Research Group
    U Koblenz B219 https://www.uni-koblenz.de/~fruit/about/pgp.html
    Oliver Obst, Sep 26, 2003
    #3
  4. Oliver Obst

    ts Guest

    >>>>> "O" == Oliver Obst <> writes:

    O> - ./configure --prefix=/xxx/local --exec-prefix=/xxx/local/intel-linux
    [...]
    O> what's wrong with that?

    ruby use internally --prefix to locate libraries


    Guy Decoux
    ts, Sep 26, 2003
    #4
  5. Oliver Obst

    Oliver Obst Guest

    ts wrote:

    >>>>>> "O" == Oliver Obst <> writes:

    >
    > O> - ./configure --prefix=/xxx/local --exec-prefix=/xxx/local/intel-linux
    > [...]
    > O> what's wrong with that?
    >
    > ruby use internally --prefix to locate libraries


    OK, I see, thanks.
    The problem is indeed resolvable by adding a symbolic link from
    ${prefix}/lib/ruby/1.8 to ${exec-prefix}/lib/ruby/1.8.

    pkgdatadir would probably be a location more suitable for the .rb files
    coming with ruby (instead of pkglibdir), but since I want to check
    existing ruby installations (from an autoconf script), I have to live with
    the way it is done now.

    Anyway it's a bit surprising ;-) that configuring ruby doesn't work the way
    one would expect, but maybe this will be resolved in future versions.

    cheers
    Oliver

    --
    Oliver Obst 0261 287-2774 101% -- how much do you give?
    AI Research Group
    U Koblenz B219 https://www.uni-koblenz.de/~fruit/about/pgp.html
    Oliver Obst, Sep 29, 2003
    #5
    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. Gavin Sinclair
    Replies:
    7
    Views:
    129
    Gavin Sinclair
    Oct 1, 2003
  2. Joel VanderWerf

    rbconfig suggestion: ruby_apps

    Joel VanderWerf, Dec 8, 2003, in forum: Ruby
    Replies:
    3
    Views:
    151
    Yukihiro Matsumoto
    Dec 9, 2003
  3. chris

    rbconfig (LoadError)

    chris, Mar 6, 2007, in forum: Ruby
    Replies:
    8
    Views:
    292
    chris
    Mar 6, 2007
  4. Axel Etzold
    Replies:
    1
    Views:
    125
    ara.t.howard
    Jun 20, 2008
  5. Älphä Blüë

    Ruby 1.8.6 One-click installer rbconfig.rb file

    Älphä Blüë, Jul 13, 2009, in forum: Ruby
    Replies:
    2
    Views:
    182
    Älphä Blüë
    Jul 14, 2009
Loading...

Share This Page