irb/completion

Discussion in 'Ruby' started by Brian McCallister, Oct 1, 2004.

  1. Hmm, any reason I'd be unable to use 'irb/completion' out of the box in
    1.8.2-preview2 ?

    It likewise ignores the request to use it in my .irbrc

    [mccallister@kite ~/src/eva]$ /usr/local/ruby-1.8.2-preview2/bin/irb
    irb(main):001:0> require 'irb/completion'
    => false

    [mccallister@kite ~/src/eva]$ ruby -v
    ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0]

    [mccallister@kite ~/src/eva]$ uname -a
    Darwin kite.forthill.int 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5
    19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power
    Macintosh powerpc

    -Brian
     
    Brian McCallister, Oct 1, 2004
    #1
    1. Advertising

  2. Brian McCallister

    Guest

    On Sat, 2 Oct 2004, Brian McCallister wrote:

    > Hmm, any reason I'd be unable to use 'irb/completion' out of the box in
    > 1.8.2-preview2 ?
    >
    > It likewise ignores the request to use it in my .irbrc
    >
    > [mccallister@kite ~/src/eva]$ /usr/local/ruby-1.8.2-preview2/bin/irb
    > irb(main):001:0> require 'irb/completion'
    > => false
    >
    > [mccallister@kite ~/src/eva]$ ruby -v
    > ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0]
    >
    > [mccallister@kite ~/src/eva]$ uname -a
    > Darwin kite.forthill.int 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5
    > 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power
    > Macintosh powerpc
    >
    > -Brian


    you need the realine library installed at configure time and linked against at
    compile time.

    so either

    a) you don't have it. install it and recompile ruby

    b) you have it but didn't link against it

    0) recompile (once) with LD_RUN_PATH pointing at it
    1) run (always) with LD_LIBRARY_PATH pointing at it
    2) reconfigure ld to find it for your system

    do a man ld.so if this doesn't make sense. bottom line, ruby doesn't have
    access to the readline shared library.

    cheers.

    -a
    --
    ===============================================================================
    | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
    | PHONE :: 303.497.6469
    | A flower falls, even though we love it;
    | and a weed grows, even though we do not love it.
    | --Dogen
    ===============================================================================
     
    , Oct 1, 2004
    #2
    1. Advertising

  3. On Oct 1, 2004, at 11:13 AM, Brian McCallister wrote:

    > Hmm, any reason I'd be unable to use 'irb/completion' out of the box
    > in 1.8.2-preview2 ?
    >
    > It likewise ignores the request to use it in my .irbrc
    >
    > [mccallister@kite ~/src/eva]$ /usr/local/ruby-1.8.2-preview2/bin/irb
    > irb(main):001:0> require 'irb/completion'
    > => false
    >
    > [mccallister@kite ~/src/eva]$ ruby -v
    > ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0]


    Yes, this was just covered here recently. Short story:

    1. irb/completion requires GNU's readline lib.

    2. Mac OS X does ship with the lib, but not the header files for Ruby
    to find in it's build process.

    3. So, you either need to bring readline support to your Ruby install,
    described here:

    http://richkilmer.blogs.com/ether/2003/10/building_ruby_1.html

    Or, build and install GNU readline and then Rebuild your Ruby install
    so it will notice it.

    I used the latter and it worked like a charm.

    Good luck.

    James Edward Gray II
     
    James Edward Gray II, Oct 1, 2004
    #3
  4. Much appreciated! Was getting fooled on readline as I had earlier set
    up an alias to run irb in rlwrap. Doh!

    -Brian

    On Oct 1, 2004, at 12:25 PM, James Edward Gray II wrote:

    > On Oct 1, 2004, at 11:13 AM, Brian McCallister wrote:
    >
    >> Hmm, any reason I'd be unable to use 'irb/completion' out of the box
    >> in 1.8.2-preview2 ?
    >>
    >> It likewise ignores the request to use it in my .irbrc
    >>
    >> [mccallister@kite ~/src/eva]$ /usr/local/ruby-1.8.2-preview2/bin/irb
    >> irb(main):001:0> require 'irb/completion'
    >> => false
    >>
    >> [mccallister@kite ~/src/eva]$ ruby -v
    >> ruby 1.8.2 (2004-07-29) [powerpc-darwin7.5.0]

    >
    > Yes, this was just covered here recently. Short story:
    >
    > 1. irb/completion requires GNU's readline lib.
    >
    > 2. Mac OS X does ship with the lib, but not the header files for Ruby
    > to find in it's build process.
    >
    > 3. So, you either need to bring readline support to your Ruby
    > install, described here:
    >
    > http://richkilmer.blogs.com/ether/2003/10/building_ruby_1.html
    >
    > Or, build and install GNU readline and then Rebuild your Ruby install
    > so it will notice it.
    >
    > I used the latter and it worked like a charm.
    >
    > Good luck.
    >
    > James Edward Gray II
    >
    >
    >
     
    Brian McCallister, Oct 1, 2004
    #4
    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. ziggs
    Replies:
    2
    Views:
    193
    Henry Robinson
    Apr 21, 2004
  2. Kent S

    IRB with completion

    Kent S, Mar 4, 2004, in forum: Ruby
    Replies:
    0
    Views:
    104
    Kent S
    Mar 4, 2004
  3. Jim Crossley

    Emacs irb with tab completion?

    Jim Crossley, Jan 30, 2005, in forum: Ruby
    Replies:
    0
    Views:
    173
    Jim Crossley
    Jan 30, 2005
  4. Brent Pedersen

    irb selective auto-completion

    Brent Pedersen, Sep 19, 2005, in forum: Ruby
    Replies:
    0
    Views:
    111
    Brent Pedersen
    Sep 19, 2005
  5. Unnsse Khan
    Replies:
    5
    Views:
    136
    Peter Burns
    Oct 22, 2005
Loading...

Share This Page