Traceroute is a project mainly written in ..., it's free.
Implementation of traceroute in ruby
Implementation of traceroute in pure ruby