21

IRb is pretty plain compared to bpython, even when using wirble.

Is there any ruby equivalent of bpython?

maček
  • 76,434
  • 37
  • 167
  • 198
  • Sorry, I totally missed the wirble part of your question and replied about trying out wirble. I don't think that my post answers your question in any way so I have voted it for deletion. – nas Jun 01 '10 at 20:45
  • @nas, no worries. Just an fyi: when you "vote" to delete your own answers, they are deleted immediately. I.e., I cannot see that you posted an answer here :) – maček Jun 01 '10 at 20:55

2 Answers2

13

You can extend irb to achieve all of bpython's functionality and more with the right gems:

  • wirble: for syntax highlightning (as you already know)
  • bond: for more advanced autocompletion
  • utilitybelt: for pastebin-like commands
  • sketches: for editing and evaluating code easily
  • boson: command framework for creating libraries of commands to be loaded as needed
  • hirb: framework for associating views per class

For more gems, see here.

cldwalker
  • 6,155
  • 2
  • 27
  • 19
  • 1
    Ok, now someone should write a gem that pulls all these in and loads them nicely with irb. Any takers? :-) – perimosocordiae Jul 25 '10 at 16:24
  • 1
    see this for your request, user83510: http://stackoverflow.com/questions/3884715/what-alternatives-to-irb-are-there – DGM Oct 08 '10 at 01:25
12

Use Pry: http://pry.github.com

It is written from scratch and let's you:

  • view method source code
  • view method documentation (not using RI so you dont have to pre-generate it)
  • pop in and out of different contexts
  • invoke at runtime, in any context
  • syntax highlighting
  • gist integration
  • view and replay history
  • open editors to edit method using edit-method obj.my_method syntax

A tonne more great and original features

maček
  • 76,434
  • 37
  • 167
  • 198
horseyguy
  • 29,455
  • 20
  • 103
  • 145