Load commands during irb startup

HI
There are the few commands that i always run from irb.
require ‘watir’

Can i load it automatically for me to save keystrokes. I can precieve
froms docs that i can, but not able to figure it out well

Seede

[email protected] wrote:

Put it in your .irbrc

http://www.rubycentral.com/book/irb.html

HI
I read that file. I am not sure how to configure it. can u provide an
example.
appreciate ur help

Where is my .irbrc. I cannot see it in my conf nor is there a file with
such a name in my c:\Ruby

Seede

[email protected] wrote:

HI
I read that file. I am not sure how to configure it. can u provide an
example.

You can simply put any ruby code in there including “require”
statements.

appreciate ur help

Where is my .irbrc. I cannot see it in my conf nor is there a file with
such a name in my c:\Ruby

It’s in your home directory. Since you didn’t give the OS and Ruby
distribution I can’t be more specific here.

Regards

robert

PS: Please don’t top post.

Hi,

On windows you must have HOME environment variable defined. Irb startup
file
must reside there.
To check your HOME variable open cmd.exe and write: echo %HOME%
To set you HOME variable: set HOME=somepath


Martins

HI. I have a windows xp os and my ruby version is
ruby 1.8.4 (2006-04-14) [i386-mswin32]

Ruby is installed in c:\ruby

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs