Now you can take any library or Rails plugin or command line
application, gemify it, and easily share it with the Ruby world.
With gems you get in-built version support (you can specify which
version of a gem you want when you use it via the require_gem method),
an encapsulated, consistent folder structure for your bin/lib/test
folders, and you get cross-platform support for bin apps. Too much
niftiness to ignore, really.
The New Gem Generator is like the rails command for rails applications,
but it creates the folders and starting files for a new gem. Itâ??s called
gem install newgem
Create new gem
And away you go. The rest of the tutorial and comments are at:
I hope this encourages you to share more code with others (both outside
and inside your own workplace).