Irb configure options

Where is a good source I can learn irb configuration options from?

I'm currently interested in whether or not I can get the up arrow to repeat my last line, but I would also like to see what's available.

Thanks.

James Edward Gray II

There’s a chapter on irb in the new PickAxe :slight_smile:

Cheers

Dave

···

On Sep 27, 2004, at 20:28, James Edward Gray II wrote:

Where is a good source I can learn irb configuration options from?

I’m currently interested in whether or not I can get the up arrow to
repeat my last line, but I would also like to see what’s available.

James Edward Gray II wrote:

Where is a good source I can learn irb configuration options from?

I'm currently interested in whether or not I can get the up arrow to repeat my last line, but I would also like to see what's available.

Thanks.

James Edward Gray II

If you don't mind going insane, take a look at:

http://poignantguide.net/ruby/expansion-pak-1.html

regards,

Brian

···

--
Brian Schröder
http://ruby.brian-schroeder.de/

James Edward Gray II <james@grayproductions.net> wrote in message news:<9DD0CC74-10ED-11D9-8CFB-000A95BA45F8@grayproductions.net>...

Where is a good source I can learn irb configuration options from?

I'm currently interested in whether or not I can get the up arrow to
repeat my last line, but I would also like to see what's available.

Thanks.

James Edward Gray II

RubyGarden has a good page on this: http://www.rubygarden.org/ruby?Irb/TipsAndTricks

I just found out about irb tab-completion over the conference weekend .... sweet.

Well, hurry up and get it to me then!

Seriously, you have my order and I’m eagerly awaiting my copy. The
original PickAxe is what brought me into Ruby to begin with, so I
expect great things from the new volume. Thanks in advance for what
I’m sure will be a great read. I’ve yet to be disappointed by any of
your books.

James Edward Gray II

···

On Sep 27, 2004, at 9:41 PM, Dave Thomas wrote:

On Sep 27, 2004, at 20:28, James Edward Gray II wrote:

Where is a good source I can learn irb configuration options from?

I’m currently interested in whether or not I can get the up arrow to
repeat my last line, but I would also like to see what’s available.

There’s a chapter on irb in the new PickAxe :slight_smile:

Thanks for the link. I'm trying to get tab completion going on Mac OS X, from the suggested:

% irb --readline -r irb/completion
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': No such file to load -- readline (LoadError)
         from /usr/local/lib/ruby/1.8/irb/completion.rb:10
         from /usr/local/lib/ruby/1.8/irb/init.rb:218:in `require'
         from /usr/local/lib/ruby/1.8/irb/init.rb:218:in `load_modules'
         from /usr/local/lib/ruby/1.8/irb/init.rb:216:in `each'
         from /usr/local/lib/ruby/1.8/irb/init.rb:216:in `load_modules'
         from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
         from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
         from /usr/local/bin/irb:13

But as you can see, I'm getting errors. Any ideas?

James Edward Gray II

···

On Sep 28, 2004, at 5:00 AM, Brian Schröder wrote:

James Edward Gray II wrote:

Where is a good source I can learn irb configuration options from?
I'm currently interested in whether or not I can get the up arrow to repeat my last line, but I would also like to see what's available.
Thanks.
James Edward Gray II

If you don't mind going insane, take a look at:

http://poignantguide.net/ruby/expansion-pak-1.html

Wow, great link. I liked every trick posted there. Thanks!

James Edward Gray II

···

On Oct 4, 2004, at 3:49 PM, Francis Hwang wrote:

RubyGarden has a good page on this: http://www.rubygarden.org/ruby?Irb/TipsAndTricks

James Edward Gray II wrote:

···

On Sep 28, 2004, at 5:00 AM, Brian Schröder wrote:

James Edward Gray II wrote:

Where is a good source I can learn irb configuration options from?
I'm currently interested in whether or not I can get the up arrow to repeat my last line, but I would also like to see what's available.
Thanks.
James Edward Gray II

If you don't mind going insane, take a look at:

http://poignantguide.net/ruby/expansion-pak-1.html

Thanks for the link. I'm trying to get tab completion going on Mac OS X, from the suggested:

% irb --readline -r irb/completion
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': No such file to load -- readline (LoadError)
        from /usr/local/lib/ruby/1.8/irb/completion.rb:10
        from /usr/local/lib/ruby/1.8/irb/init.rb:218:in `require'
        from /usr/local/lib/ruby/1.8/irb/init.rb:218:in `load_modules'
        from /usr/local/lib/ruby/1.8/irb/init.rb:216:in `each'
        from /usr/local/lib/ruby/1.8/irb/init.rb:216:in `load_modules'
        from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
        from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
        from /usr/local/bin/irb:13

But as you can see, I'm getting errors. Any ideas?

James Edward Gray II

I don't run Max OS but it seems to me that you are missing the readline bindings for ruby.

Regards,

Brian

--
Brian Schröder
http://ruby.brian-schroeder.de/

Yeah, that must be it. I can't load that module from Ruby. I installed 1.8.2pre2 from source. I wonder why it missed it.

James Edward Gray II

···

On Sep 28, 2004, at 8:37 AM, Brian Schröder wrote:

I don't run Max OS but it seems to me that you are missing the readline bindings for ruby.

James Edward Gray II wrote:

···

On Sep 28, 2004, at 8:37 AM, Brian Schröder wrote:

I don't run Max OS but it seems to me that you are missing the readline bindings for ruby.

Yeah, that must be it. I can't load that module from Ruby. I installed 1.8.2pre2 from source. I wonder why it missed it.

In case, you're still strugglin...

Chris has a few distribution links:
<http://rubyforge.org/pipermail/poignant-stiffs/2004-July/000086.html&gt;

For anyone having problems on Windows:
<http://rubyforge.org/pipermail/poignant-stiffs/2004-July/000089.html&gt;

_why

Thanks. This link explains the Mac OS X problem. Unfortunately, it's a little dated (focusing on OS X.2). I'll fiddle around a bit, now that I know what I'm looking for though.

If anybody has managed to get readline working with Ruby 1.8.2pre2 on Mac OS X though, please chime in with the steps...

James Edward Gray II

···

On Sep 28, 2004, at 10:00 AM, why the lucky stiff wrote:

In case, you're still strugglin...

Chris has a few distribution links:
<http://rubyforge.org/pipermail/poignant-stiffs/2004-July/000086.html&gt;

There are still some people who don't have auto-completion in irb
working properly. In my case (latest One-Click Installer on Win2K), if I
type Array::<tab>, I get a list of methods alright. But if I do
Array.<tab>, I get a segfault instead. On Linux at home completion
works like a swiss clock though.

Is there a recipe for this predicament?

Alex

···

On Tue, 2004-09-28 at 18:00, why the lucky stiff wrote:

In case, you're still strugglin...

In case, you're still strugglin...

Chris has a few distribution links:
<http://rubyforge.org/pipermail/poignant-stiffs/2004-July/000086.html&gt;

Thanks. This link explains the Mac OS X problem. Unfortunately, it's a little dated (focusing on OS X.2). I'll fiddle around a bit, now that I know what I'm looking for though.

If anybody has managed to get readline working with Ruby 1.8.2pre2 on Mac OS X though, please chime in with the steps...

Mac OS X usually has a readline library installed; and if it is installed, it's not in a standard place; so Ruby's readline support quietly fails to compile. I know you can download a precompiled readline.bundle [1], which you can just drop in, or you can download gnu readline to compile against.

HTH,
Mark

[1] http://cherryville.org/8896/ruby_readline_for_mac.html

···

On Sep 28, 2004, at 8:24 AM, James Edward Gray II wrote:

On Sep 28, 2004, at 10:00 AM, why the lucky stiff wrote:

James Edward Gray II

This is a little old but it was helpful the first time I installed ruby on OS X:
http://richkilmer.blogs.com/ether/2003/10/building_ruby_1.html

It has been a while since I compiled and installed readline on my system - I am using 4.3, looks like 5.0 is available now:
http://directory.fsf.org/GNU/readline.html
Compiling that from source... installing... works fine.

So I am using Ruby 1.8.2pre2 with readline 5.0 all installed under /usr/local. irb works as expected.
Are you compiling everything from source?
-Charlie

···

On Sep 28, 2004, at 8:24 AM, James Edward Gray II wrote:

On Sep 28, 2004, at 10:00 AM, why the lucky stiff wrote:

In case, you're still strugglin...

Chris has a few distribution links:
<http://rubyforge.org/pipermail/poignant-stiffs/2004-July/000086.html&gt;

Thanks. This link explains the Mac OS X problem. Unfortunately, it's a little dated (focusing on OS X.2). I'll fiddle around a bit, now that I know what I'm looking for though.

If anybody has managed to get readline working with Ruby 1.8.2pre2 on Mac OS X though, please chime in with the steps...

James Edward Gray II

* Alexey Verkhovsky <alex@verk.info> [0902 18:02]:

···

On Tue, 2004-09-28 at 18:00, why the lucky stiff wrote:
> In case, you're still strugglin...

There are still some people who don't have auto-completion in irb
working properly. In my case (latest One-Click Installer on Win2K), if I
type Array::<tab>, I get a list of methods alright. But if I do
Array.<tab>, I get a segfault instead. On Linux at home completion
works like a swiss clock though.

Is there an '--enable-readline' configure flag or similar? That would strike
me as a saner option that all the LD* environment variable hackery...

(No, it still doesn't work out of the box on NetBSD. Bitter, me? :slight_smile: )

--
You may need to metaphorically make a deal with the devil.
By 'devil' I mean robot devil and by 'metaphorically' I mean get your coat. - Bender
Rasputin :: Jack of All Trades - Master of Nuns

GNU readline did the trick for me and I now have tab completion is irb. Thanks much.

James Edward Gray II

···

On Sep 28, 2004, at 11:41 AM, Mark Hubbart wrote:

Mac OS X usually has a readline library installed; and if it is installed, it's not in a standard place; so Ruby's readline support quietly fails to compile. I know you can download a precompiled readline.bundle [1], which you can just drop in, or you can download gnu readline to compile against.