On 10/09/2010 04:54 PM, Ruby Program wrote:
> Darren Nickerson wrote:
>> Hi,
>> Iam starting to learn ruby, today is my first day actually working with
>> terminal and things are going pretty good. I just have a quick question,
>> when I go into irb the book I am reading ("Ruby novice to professional"
>> from apress ) tells me that there should be irb(main):001:0> each line,
>> but for me all I have is >>
>> all the ruby commands work fine. I just don't like not having the line
>> numbers. This is probably very simple but please help a newbie out.
>> Thanks for your time.
> 
> I looked into it and I can only guess since you did not state it. But >> 
> seems to be the mac irb style, => for linux and irb(main):001:0> style 
> for windows. So if you want to have the numbers I suggest you invest 
> into an ide or text editor. There are many choices some of the free 
> options are netbeans for an ide and notepad++ for text editor. Those 
> both come with the option to have numbered lines.
> 
> If you like it in the irb you will have to run a windows machine it 
> seems.

On my Ubuntu system, the prompt has the desired style with line numbers:

$ irb
irb(main):001:0>

This is simply a difference in the default prompt as defined by the
version of irb, the system defaults for irb, and/or the user overrides
for irb.  The irb prompt is actually equally configurable on any
platform from what I've seen. :-)

http://ruby-doc.org/docs/ProgrammingRuby/html/irb.html

Search for "Configuring the Prompt".  I'm sure there are other sources
for information as well.

-Jeremy