Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Whois: A New Pure-Ruby Whois Gem

By Ric Roberts / August 13, 2009

guess who?Simone Carletti of Altura Labs recently announced on his blog the release of a new pure-Ruby Whois library, inventively named "Whois".

He needed a whois library for one of his projects, but found that the existing options didn't satisfy his requirement of being able to query both IP addresses and top level domains.  Simone's offering replaces the original whois gem by Cyril Mougel, with which it's backward compatible.

Using the 'all-in-one' whois class-method will give you the default behaviour, with a timeout of 5 seconds. If you want more control you can initialize a new instance of the client:

# => whois response for

client =
client.timeout = 3
# => whois response for

For more details, check out Simone's blog post, the docs, and the Github repository.


  1. roger says:

    I also created a "pure ruby which" command recently--apparently pure ruby is cool :)

  2. Hubert Łępicki says:

    I have recently spoken to someone about "whois" not being able to query both tlds and ip addresses -- but it wasn't Simone! Anyway, the village gossip must have spread fast and hit Italy quickly ;)

Other Posts to Enjoy

Twitter Mentions