Publishing to RubyGems
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.
This page assumes that you have:
- An initialized
fern
folder. See Set up thefern
folder. - A GitHub repository for your SDK. See Project Structure.
Configure generators.yml
Configure output
location
Next, change the output location in generators.yml
from local-file-system
(the default) to pypi
to indicate that Fern should publish your package directly to the PyPI registry:
Add a unique package name
Your package name must be unique in the RubyGems repository, otherwise publishing your SDK to RubyGems will fail. Update your package name if you haven’t done so already:
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 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.

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