2009/2/19 Philip McDonald <philip_mcdonald / mac.com>:
> Hi List!
>
> I am beginning to learn Ruby ( vers. 1.8.6) , and I am using OS X (10.5.4),
> and accessing irb through terminal.  On OS X, irb loads from a /etc/irbrc
> file that includes the 'simple prompt' code.  I don't like the simple
> prompt, and am trying to create my own irbrc for irb to read when it logs
> in.
>
> Firstly, the general instructions are to create a ~/.irbrc file, which I
> understand as an instruction to create a simple txt file, which I have
> called variously ".irbrc", "$irbrc", and " ".irbrc" ", and placed in a
> 'ruby' folder under my home directory (my 'mac' house on the finder)
>
> I then put the code:    IRB.conf[:PROMPT_MODE][:DEFAULT] = {:PROMPT_I =>
> "%N(%m):%03n:%i>
>                                        end
>
>
> saved it, then exited terminal, restarted it, and logged back into irb.
>
> STILL getting the simple prompt, and the 'double tab' auto-completion thing
> still works (also a part of the OSX etc irbrc file) so I know that irb is
> not reading my irbrc file.
>
>
> What am I doing wrong?  I've searched and searched, and I seem to be
> following the general instructions pretty well.

Try this from a shell prompt (bash assumed):

echo 'puts "loaded"' >| ~/.irbrc
irb

If you see "loaded" printed on the screen your rc file is correctly
read.  If not, something with your irb or installation may be wrong or
you have an alias like alias irb='irb -f' (try "type -a irb" in bash).

Cheers

robert


-- 
remember.guy do |as, often| as.you_can - without end