Instructions
Create the GemSpec file. The easiest way to do this is with the NewGem tool from the RubyForge Gem library. To enable it for use on your system, type the following from a command line, a text driven tool for controlling your computer:
gem install newgem
If you are using a Linux of Mac OS X system, you may need to preface this with the "sudo" command, which forces the command to run with full administrative privileges, allowing it to modify the system directories.
Navigate to the directory that contains the Ruby source files that you would like to include in the Gem. For example, if the source files are in C:\myrubycode, type the following:
cd C:\myrubycode
Type the following to create the gemspec file that describes the traits of the gem:
newgem gemName
Replace "gemName" with the name that you want your gem to have.
Open a text editor, such as Windows Notepad, and open the gemspec file generated. Fill in any missing details, such as your own name, copyright and Gem description.