Archive for January 22nd, 2008
Reduce Annoying “requires” in ruby’s irb

It is quite annoying to use require again and again while testing anything in irb.
For that purpose it is useful to create a file called .irbrc in the home directory.
Here simply write sth like this:

require ‘rubygems’
require ‘socket’

Now every time you start irb the packages are loaded by default.

For windows it is also necessary to have an appropriate HOME Variable pointing to the right directory.