Creating a gem from scratch
Create a skeleton gem
$ bundle gem my_awesome_gemWrite code and tests
Build and install gem locally
$ rake build $ gem install pkg/my_awesome_gem-0.0.4.gem(or you can type
$ rake installinstead)[optional] Push the gem to rubygems.org
$ gem push pkg/my_awesome_gem-0.0.4.gem
Updating an existing gem
Make the code changes
Update the version number in
version.rbBuild and install the gem locally
$ rake install[optional] Push the gem to rubygems.org
$ gem push pkg/my_awesome_gem-0.0.4.gem
Unpacking a gem into a ruby application
$ gem unpack my_awesome_gem -v 0.0.4 --target vendor/gems
Pushing a new version to rubygems
$ gem push pkg/my_awesome_gem-0.0.4.gem
Multiple rubygems accounts
Install keycutter
View existing keys (default key is marked with a *)
$ gem keys --listAdd a new key (you'll be prompted for your credentials)
$ gem keys --add workChange the key used to connect to rubygems
$ gem keys --default work