Publishing to RubyGems
This feature is available only for the Enterprise plan. To get started, reach out to support@buildwithfern.com.
Publish your public-facing Fern Ruby SDK to the RubyGems
registry. After following the steps on this page,
you’ll have a versioned package published on RubyGems. To distribute the SDK
internally instead, generate to the local file system (optionally
self-hosted) and build a gem with
fern generate --package.
This page assumes that you have:
- An initialized
fernfolder, a GitHub repository for your Ruby SDK, and a Ruby target insdk-config.yml. See Generating an SDK (Ruby).
Configure sdk-config.yml
Update the Ruby target in sdk-config.yml to configure the gem name, client name, and publishing destination. Your sdk-config.yml should live in your source repository (or on your local machine), not the repository that contains your Ruby SDK code.
Add a unique package name
Your package name must be unique in the RubyGems repository, otherwise publishing your SDK to RubyGems will fail.
Set up RubyGems publishing authentication
Add New Key
When prompted to create a new API key:
- Name your key.
- Under Scopes, select Push rubygem
- Select
All Gemsunder Gem Scope.
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.

Release your SDK to RubyGems
At this point, you’re ready to generate a release for your SDK.