h1. New Gem Generator
h1. → using 'rubyforge'
The New Gem Generator makes it very easy for you to upload your gems to RubyForge, thanks to the integration of the hoe
and rubyforge
gems, by "Ryan Davis":http://blog.zenspider.com/.
This page describes how to setup the _rubyforge_ application (lowercase rubyforge = the application), create new RubyForge projects (uppercase RubyForge = the website for hosting gems and homepages), and releasing your gems and their future versions to RubyForge using _rubyforge_.
h2. Get a RubyForge project.
RubyForge is a great site for uploading gems, as the default settings of all RubyGems users is to look for new gems there. You can run your own gem server, but here we'll assume you're uploading to RubyForge.
Additionally, you can host more than one gem on each project. The Magic Models project hosts several gems, each with different versions.
To host your gems you'll need a Project. Apply for it asap as it takes a day or so for the RubyForge admins to accept and generate your project.
*Note:* the name of your project does not have to match the name of any of your gems.
h3. Setup access to RubyForge
Your new gem will use the rubyforge app to upload your gem. So first we need to set it up.
$ sudo gem install rubyforge $ rubyforge setup $ mate ~/.rubyforge/user-config.ymlThis creates a configuration folder
.rubyforge
in your home folder (on Windows it is XXXXXX). The last line is to edit the config file.
The only two lines to set are your RubyForge *username* and *password*. Ignore the rest.
$ rubyforge configThis generates a file
~/.rubyforge/auto-config.yml
which will be mostly empty now, but one day will be full of projects and all the releases of different versions of gems. One day soon I hope.
Just like the website, all other operations require you to login first.
$ rubyforge loginIf this fails, check your user-config.yml files for problems with your username/password. h3. Preparing for a new gem When you first release a new gem, you need to perform one more step.
$ rubyforge login $ rubyforge namesThis will return the name of your new Project, if you forgot it.
$ rubyforge create_package #project_name# #gem_name#Alternately, if you can't get this to work, you can create the new package via the website. # "Login to RubyForge":https://rubyforge.org/account/login.php # Go to your project's page # Click on *Files*. # Click on *To create new release click here*. # Click on *Create a new package*. # Go to the bottom of the page, to the form *New Package Name*. # Enter a package name, without spaces, and generally in all lowercase letters. # Click *Create This Package* Now return to the console/terminal, and refresh your rubyforge config files using
rubyforge config
.
Check that the new package has been successfully added to your local config files using rubyforge name
. The new package should appear in the list of package names.
h2. You are now ready to release gems!
"Return to releasing your gem":index.html#setup_rubyforge