Weights_and_measurements is a project mainly written in Ruby, it's free.
An extension to core Ruby objects to implement weight and measurement conversions