Private Ruby gems

Learn how to distribute your private Ruby gems.

Installation instructions

Your customers must register the following private gem source before they can install the gem:

gem sources --add https://your-product-identifier.rubygem.pub

Once the repository source has been added, they can install your product like any other Ruby gem using the gem install command:

gem install your-product-identifier

Example with license

If you require customers to have a valid license key in order to install or update the gem, they will need to enter their email and license key.

  • Licensee email: philo@unlock.sh
  • License key: 8c21df8f-6273-4932-b4ba-8bcc723ef500

Important

Special characters in the email address must be URL encoded. So instead of the @ symbol they must enter %40. Click here to encode a string.

gem sources --add https://philo%40unlock.sh:8c21df8f-6273-4932-b4ba-8bcc723ef500@your-product-identifier.rubygem.pub

Example with license and activation

If your licensing policy requires a fingerprint your customers will need to append their fingerprint to their license key.

  • Licensee email: philo@unlock.sh
  • License key: 8c21df8f-6273-4932-b4ba-8bcc723ef500
  • Activation fingerprint: unlock.sh

This will require your licensee to enter the following information when prompted for their credentials:

gem sources --add https://philo%40unlock.sh:8c21df8f-6273-4932-b4ba-8bcc723ef500:unlock.sh@your-product-identifier.rubygem.pub

To clarify, the license key and fingerprint should be separated by a colon (:).