Installing private RubyGems

Once you have signed up for a Gemfury account and uploaded a few Gems, you can install them via the command-line, or with a Bundler Gemfile.

Your private Source URL

The secret Source URL is the RubyGems endpoint for your Gemfury account. Do not share this URL to keep your account private. To retrieve this URL, follow these steps:

  1. Go to your dashboard

  2. Select the Get Started tab and then RubyGems

  3. Get the Source URL of the format

Install RubyGems with a Gemfile (Bundler 1.7+)

Using private Gems with Bundler is easy, just add a source scope using your Gemfury Repo-URL to your Gemfile and enclose your private packages as:

source '' do
  gem 'private-gem', '~> 1.0'

You can also apply it to individual packages with:

  gem 'private-gem', source: ''

And then run bundle install as usual.

Install RubyGems with a Gemfile (Bundler pre-1.7)

If you’re using Bundler 1.6.x or earlier, add your Gemfury Repo-URL to the top of the project’s Gemfile.

source ''

Then add your private packages and run bundle install.

Install RubyGems with command-line

To use Gemfury with the command line, add the Source URL to your .gemrc with this command:

$ gem sources -a

Or, use it in a single install:

$ gem install my-gem --source

Keep your privates private (Bundler 1.8+)

To keep up with the best practices, it’s important to keep your Gemfury credentials out of your source code, particularly your Gemfile and Gemfury.lock files. Furthermore, we encourage each developer to use their individual credentials to access shared accounts. We suggest the following.

When specifying your Repo-URL in your Gemfile, please don’t explicitly place your secret token in the source code. Instead, use this:

source "" ...

Then configure your Gemfury credentials via Bundler’s configuration. This can be done by specifying it via bundler config for a particular account:

bundle config PeRSonAl-SeCrEt-ToKeN

Or globally for all of your Gemfury use:

bundle config PeRSonAl-SeCrEt-ToKeN

Naturally, you can also specify this configuration via the environment in both development and production settings:


In both cases, Bundler will automatically apply these credentials to your Gemfury source declarations.

Keep your privates private (Bundler pre-1.8)

When specifying your Repo-URL in your Gemfile, use this:

source "https://#{ENV['FURY_AUTH']}" ...

This solution works well in both development and production settings because Bundler will first try to use FURY_AUTH from the environment, and if that’s blank, it will fall back to Bundler credentials store.

So in production, you can use the facilities of your platform to define FURY_AUTH in a secure manner. And in development, each developer has the option of either modifying their ~/.profile:

export FURY_AUTH=PeRSonAl-SeCrEt-ToKeN

Or using bundler config to globally specify the auth info:

bundle config PeRSonAl-SeCrEt-ToKeN

An unfortunate side-effect is that Bundler will occasionally put your secret token into Gemfile.lock. It is safe to remove the token and committing just the Repo-URL without credentials into your SCM:


Uploading packages using RubyGems CLI

Gemfury supports Gemcutter API for uploading RubyGems. You can push one to your account by running:

gem push PACKAGE_FILE --host

To separately store your credentials, add your push token to ~/.gem/credentials:

:fury_push_token: PUSHTOKEN

And use --key to reference the token from your command:

gem push PACKAGE_FILE --key fury_push_token --host

Problems deploying RubyGems

If you are seeing Bundler::HTTPError exceptions when using Gemfury with Bundler, please update your Bundler to the latest version by running gem update bundler

If you’re still having trouble, you can try path-based authentication with the following Repo-URL: