Publish your Ruby SDK with RubyGems

To make your Ruby SDK publicly accessible, publish to RubyGems. Once you’ve followed the steps below to connect your Ruby account to your SDK, Fern will automatically publish the latest version of your SDK.

Creating a RubyGems API key

1

Log In

You’ll first need to create an account with RubyGems to register your SDK.

If you have an account already, sign in.

3

Create an API key

When prompted to create a new API key:

  • Name your key.
  • Under Scopes, select Push rubygem
  • Select All Gems under Gem Scope.
    Replacing an existing gem

    If you are overriding an existing gem, you can select the relevant package instead of entering All Gems.

  • Set an expiration date.
  • Click Create API Key.
Save your API key

Be sure to save the generated key - it won’t be displayed after you leave the page.

Adding API keys to your GitHub repository

Using GitLab? Follow these steps.

1

Open Repository

Open your Fern repository in GitHub.

3

Add Secret

Select New repository secret. Name your secret (we recommend RUBYGEMS_API_KEY), add the corresponding API key, and click Add secret.

Once you regenerate your SDK, a GitHub action will run to publish directly to RubyGems!