RubyGems Packages Repository
Publish RubyGems packages for your user or organization.
Requirements
To work with the RubyGems package registry, you need to use the gem command line tool to consume and publish packages.
Configuring the package registry
To register the package registry edit the ~/.gem/credentials
file and add:
Parameter | Description |
---|---|
owner | The owner of the package. |
token | Your personal access token. |
For example:
Publish a package
Publish a package by running the following command:
Parameter | Description |
---|---|
host | URL to the package registry. |
package_file | Path to the package .gem file. |
For example:
You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.
Install a package
To install a package from the package registry you can use Bundler or gem
.
Bundler
Add a new source
block to your Gemfile
:
Parameter | Description |
---|---|
owner | The owner of the package. |
package_name | The package name. |
For example:
Afterwards run the following command:
gem
Execute the following command:
Parameter | Description |
---|---|
owner | The owner of the package. |
package_name | The package name. |
For example: