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.

Setup Instructions

Create a Remote Repository

  1. Navigate to the Administration tab (top navbar next to Application)
    JFrog Artifactory interface showing the Administration tab selected in the top navigation bar
  2. Select Repositories (left side navbar)
    JFrog Artifactory Administration page showing the Repositories option in the left sidebar navigation
  3. Navigate to the Remote subtab.
    JFrog Artifactory Repositories page showing the Remote subtab selected
  4. Select Create Repository > Remote, and then select Gems as the type.
    JFrog Artifactory showing the Create Repository dropdown menu with Remote option visibleJFrog Artifactory repository type selection screen showing Gems selected as the repository type
  5. Configure the following parameters on the Basic tab:
    JFrog Artifactory Basic tab configuration form for creating a RubyGems remote repository
    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:
    JFrog Artifactory Advanced tab configuration form for the RubyGems remote repository showing Bypass HEAD Requests and Disable URL Normalization checkboxes
    • Ensure Bypass HEAD Requests is checked
    • Ensure Disable URL Normalization is checked

The final results should look similar to the following:

Basic

Completed JFrog Artifactory Basic tab configuration for RubyGems remote repository showing Repository Key, URL, Username, Password, Include Patterns, and Remote Mapping Layout fields filled in

Advanced

Completed JFrog Artifactory Advanced tab configuration for RubyGems remote repository showing Bypass HEAD Requests and Disable URL Normalization options checked

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.