1. Create a GEM Spec
http://onestepback.org/articles/rubygemsfacets/steponecreateagemspec.html
2. Create the gem with
gem build mygem.gemspec
Rake can automate the work of building a gem.
http://onestepback.org/articles/rubygemsfacets/usingrake.html