missing '=>' in ruby irb results
Domanda
I'm reading an eBook for EXTREME beginners in Ruby. It's walking me through VERY step-by-step, but I want to make sure I'm doing it right before I move on.
My first problem was when I typed irb
. Instead of getting irb(main):001:0>
like I was supposed to, I just got >>
. I finally found how to change my prompt format to inf-ruby
.
NOW, I'm worried about missing the other prefixes on each line. There are no resulting =>
s or >
s. Can someone explain to me (very simply) how to "turn those on" so that I can compare my code exactly to my book?
Thank you so much.
(I'm on Mac OS X 1.7, Ruby 1.8.7, using terminal)
Soluzione
try
irb --prompt default
or
irb --prompt inf-ruby --readline
or this after irb starts
conf.prompt_c="%N(%m):%03n:%i* "
conf.prompt_i="%N(%m):%03n:%i> "
conf.prompt_mode=:DEFAULT
conf.prompt_n="%N(%m):%03n:%i> "
conf.prompt_s="%N(%m):%03n:%i%l "
also check irb --help
it has some great help use that :)
Altri suggerimenti
Did you run irb --prompt simple
?
This explains:
http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html#prompt