Benjamin Curtis

Speculations on Web Development

UPS Shipping With Rails

| Comments

If you’d like a quick and dirty UPS rate calculator to use in your Ruby/Rails projects, check out this bit of code I did, based on the great shipping gem:

Changes from the shipping gem include replacing REXML with Hpricot and adding a method to get a list of available methods and rates for a particular package. It uses the UPS Online Tools, so you’ll need to get a shipping account with UPS to use it, but you can get one of those for free and fairly painlessly.

I’ve used this code in a few e-commerce projects now, so hopefully it will work pretty well for you, too. Use it as you wish, but you get no warranty. :)