RubyGems.org

Gem Docs

how to use RubyGems.org

For gem publishers, you'll want to first upgrade to the latest RubyGems version. As of RubyGems 1.3.6, gem push and gem owner have been merged in, so you will only need to install the gemcutter gem for new commands like gem webhook.

gem push

Publish your gems to the world with one command. All that's required is your very own RubyGems.org account. The first time you push, you'll be asked to log in, and then it will save your API key to ~/.gem/credentials. Once your gem is pushed, it is processed, indexed, and uploaded to Amazon S3 behind the scenes and should be available for download within moments.

$ gem push pkg/gemcutter-0.1.3.gem
Enter your RubyGems.org credentials. Don't have an account yet? Create one at http://rubygems.org/sign_up
Email:   nick@quaran.to
Password:
Signed in. Your api key has been stored in ~/.gem/credentials
Pushing gem to RubyGems.org...
Successfully registered gem: gemcutter (0.1.3)

gem owner

This command is used to give access to other users to push gems. They will also be able to edit the links through Gemcutter's web interface. You'll need to know the user's email address and they'll need a confirmed account.

$ gem owner gemcutter
Owners for gem: gemcutter
- josh@technicalpickles.com
- nick@quaran.to

$ gem owner gemcutter --remove josh@technicalpickles.com
Removed owner: josh@technicalpickles.com
Owners for gem: gemcutter
- nick@quaran.to

$ gem owner gemcutter --add josh@technicalpickles.com
Added owner: josh@technicalpickles.com
Owners for gem: gemcutter
- josh@technicalpickles.com
- nick@quaran.to

gem webhook

Register a webhook that will be called any time a gem is updated on Gemcutter. Webhooks can be created for either specific gems or all gems. In both cases you'll get a POST request of the gem in JSON format at the URL you specify in the command. You can also use this command to test fire a webhook for any gem. The JSON hash posted is the API representation of the gem.

$ gem webhook rails --add http://example.com
Successfully created webhook for rails to http://example.com

$ gem webhook --global --add http://something.net
Adding webhook...
Successfully created webhook for all gems to http://something.net

$ gem webhook
rails:
- http://example.com
all gems:
- http://something.net

$ gem webhook -g
all gems:
- http://something.net

$ gem webhook rails
rails:
- http://example.com

$ gem webhook rails --remove http://example.com
Removing webhook...
Successfully removed webhook for rails to http://example.com

$ gem webhook rack --fire http://example.com
Test firing webhook...
Successfully deployed webhook for rack to http://example.com

gem yank

Remove a gem from RubyGems.org's index. Yanking a gem leaves it available for download on the site, but not through the RubyGems client. You can also undo a yank if you mistakenly decided to yank a gem. If you need a gem deleted permanently, feel free to open a request on our support site.

$ gem yank bills -v 0.0.1
Yanking gem from RubyGems.org...
Successfully yanked gem: bills (0.0.1)

$ gem yank bills --undo -v 0.0.1
Unyanking gem from RubyGems.org...
Successfully unyanked gem: bills (0.0.1)

gem tumble

This command has been deprecated since RubyGems.org is now the official gem source.

gem migrate

This command has been deprecated since the RubyForge accounts have been migrated over.