> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Publish Ruby SDKs manually

This guide covers publishing Ruby SDKs manually. For information on automating Ruby SDK publishing, see [Publish Ruby SDKs automatically](/docs/sdk-generator/publish/ruby-auto/).

To share your generated Ruby SDK with the community, you can publish it to RubyGems. This enables other developers to easily install it using the `gem install` command. Follow the steps below to publish your SDK to RubyGems.

## Publish your Ruby SDK to RubyGems

To publish your SDK to RubyGems, do the following:

1. If you haven't done so, create a RubyGems account:

   * Register at [RubyGems](https://rubygems.org/sign_up).
   * Set up your API credentials:

   ```bash
   gem push --help  # This will prompt for credentials on first use
   ```

2. Prepare your gem for publishing:

   ```bash
   # Check code style
   bundle exec rubocop

   # Build the gem
   gem build your-sdk.gemspec
   ```

   This creates `your-sdk-1.0.0.gem` in the current directory.

3. Validate the gem:

   ```bash
   gem specification your-sdk-1.0.0.gem
   ```

4. Publish to RubyGems:

   ```bash
   gem push your-sdk-1.0.0.gem
   ```

5. Verify publication:

   ```bash
   gem install your-sdk
   # Or visit: https://rubygems.org/gems/your-sdk
   ```

## Publish updates

1. Update the version in `lib/your_sdk/version.rb`:

   ```ruby
   module YourSdk
     VERSION = "1.0.1"
   end
   ```

2. Update `CHANGELOG.md` with changes.

3. Build and publish:

   ```bash
   gem build your-sdk.gemspec
   gem push your-sdk-1.0.1.gem
   ```

## Best practices for publishing Ruby SDKs

Use the following best practices when publishing your Ruby SDK to RubyGems:

* Use semantic versioning (`MAJOR.MINOR.PATCH`).
* Maintain a `CHANGELOG.md` documenting changes.
* Use YARD documentation comments for API documentation.
* Follow Ruby style guidelines (use RuboCop).
* Pin major versions of dependencies in your gemspec.
* Include metadata URLs in your gemspec for better discoverability.
* Test your gem installation in a clean environment before publishing.