Artifactory (RubyGems)

3 Easy Steps

Teams using JFrog Artifactory can manage access to NES packages through 3 easy steps:

  1. Create a Remote Repository for our private RubyGems registry.
  2. Configure (or create) a Virtual Repository to leverage the newly created Remote Repository.
  3. Verify your developers are able to access our package through your Virtual Repository.

Create a Remote Repository

  1. Navigate to the Administration tab (top navbar next to Application)
    "Step 1"
  2. Select Repositories (left side navbar)
    "Step 2"
  3. Navigate to the Remote subtab.
    "Step 3"
  4. Select Create Repository > Remote, and then select Gems as the type.
    "Step 4a""Step 4b"
  5. Configure the following parameters on the Basic tab:
    "Step 5"
    ParameterValue
    Repository Keynes (or whatever alias your team prefers)
    URLhttps://registry.nes.herodevs.com/rubygems
    Usernameartifactory
    Password<NES_ACCESS_TOKEN>
    Include Patternsleave the default glob **/* pattern
    Remote Mapping Layoutsimple-default
  6. Configure the following on the Advanced tab:
    "Step 6"
    • Ensure Bypass HEAD Requests is checked
    • Ensure Disable URL Normalization is checked

The final results should look similar to the following:

Basic

"Result-Basic"

Advanced

"Result-Advanced"

Verify Access

Lastly, with your Virtual Repository keyed as gems-default and assuming that you have a valid Artifactory username / password, configure your Gemfile accordingly:

Gemfile
source 'https://<USERNAME>:<PASSWORD>@<DOMAIN>.jfrog.io/artifactory/api/gems/<REPO_NAME>/' do
  gem 'rails', '2.3.18.59'
  gem 'actionmailer',     :require => false
  gem 'actionpack',       :require => false
  gem 'activerecord',     :require => false
  gem 'activeresource',   :require => false
  gem 'activesupport',    :require => false
  gem 'railties',         :require => false
  gem 'rack',             :require => false
end

Once the above steps are completed Artifactory will:

  • Attempt to download packages inside the sourc block will pull from our private registry.

The Final Check

  1. Open a project containing the Gemfile
  2. Execute an bundle install command.

You should see successful output from the bundle install command and a generated Gemfile.lock with the right information.