require rubygems must come before other requires

Re-order requires to make it work with ruby 1.8. (fix to @056b380)