Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-26103

Gem Install Fails in Offline Mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: 4 - Normal
    • Resolution: Unresolved
    • Affects Version/s: 7.9.1
    • Fix Version/s: None
    • Component/s: Artifactory, RubyGems
    • Labels:
      None
    • Location:
      External

      Description

      Problem description: A RubyGems repository that is marked as offline will respond with a 404 to certain Gem installations that already exist in the cache.

      What is the expected behavior? Pulling the Gem from the cache repository and installing successfully in offline mode.

      Steps to reproduce:

      1. Create a RubyGems repository using Quick Setup

      2. Configure your Gem client using the Set Me Up

      3. Run the below command: 

      gem install -V debouncer
      http://ARTIFACTORY_URL/artifactory/api/gems/gems/api/v1/dependencies
      200 OK
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/api/v1/dependencies?gems=debouncer
      200 OK
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.gitignore
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.rspec
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.ruby-version
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.travis.yml
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/CODE_OF_CONDUCT.md
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/Gemfile
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/LICENSE.txt
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/README.md
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/Rakefile
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/bin/console
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/bin/setup
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/debouncer.gemspec
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/debounceable.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/group.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/inspection.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/version.rb
      Successfully installed debouncer-0.2.2
      Parsing documentation for debouncer-0.2.2
      Parsing sources...
      100% [ 5/ 5]  lib/debouncer/version.rb
      Done installing documentation for debouncer after 0 seconds
      1 gem installed
      

      4. Set the remote repository to offline mode

      5. Run the below command: 

      gem install -V debouncer
      HEAD http://ARTIFACTORY_URL/artifactory/api/gems/gems/api/v1/dependencies
      404 Not Found
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/prerelease_specs.4.8.gz
      200 OK
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/specs.4.8.gz
      200 OK
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/quick/Marshal.4.8/debouncer-0.1.0.gemspec.rz
      404 Not Found
      ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
          bad response Not Found 404 (http://ARTIFACTORY_URL/artifactory/api/gems/gems/quick/Marshal.4.8/debouncer-0.1.0.gemspec.rz)
      

      Possible workaround: specify the desired version:

      gem install -V -v 0.2.2 debouncer --no-document
      HEAD http://ARTIFACTORY_URL/artifactory/api/gems/gems/api/v1/dependencies
      404 Not Found
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/prerelease_specs.4.8.gz
      304 Not Modified
       
      GET http://ARTIFACTORY_URL/artifactory/api/gems/gems/specs.4.8.gz
      304 Not Modified
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.gitignore
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.rspec
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.ruby-version
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/.travis.yml
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/CODE_OF_CONDUCT.md
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/Gemfile
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/LICENSE.txt
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/README.md
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/Rakefile
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/bin/console
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/bin/setup
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/debouncer.gemspec
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/debounceable.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/group.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/inspection.rb
      /var/lib/gems/2.5.0/gems/debouncer-0.2.2/lib/debouncer/version.rb
      Successfully installed debouncer-0.2.2
      1 gem installed
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            fadir Fadi Rouhana
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Sync Status

                Connection: RTFACT Sync
                RTMID-26104 -
                SYNCHRONIZED
                • Last Sync Date: