Skip to content

How to add custom gems to PDK in an Airgapped/Offline environment without functioning rubygems server #1318

Description

@Cinderhaze

Describe the bug
It is difficult to add new gems to an airgapped machine without a functioning rubygems server.
The Omnibus/All in one package for the PDK makes it really easy to get started using the default/provided gems. Is there a good way to add additional gems when you don't have access to a working rubygems server?

I noticed that if you do a pdk bundle exec gem install ~/path/to.gem, it will install the gem into ~/.gem/ruby, but the pdk seems to expect things to be cached in ~/.pdk/cache/ruby`.

If I cp -r --no-clobber ~/.gem/ruby ~/.pdk/cache/ , I can then get pdk bundle install --local to work (after adding my gems to my Gemfile). Is there a better way to do this?

Expected behavior
I know it is more a lack of understanding bundler, and how things are configured for the PDK, but I had expected pdk bundle exec gem install foo.gem to install the gem 'locally' for the pdk session, and pdk bundle install --local to work with the above installed gem after adding it to your Gemfile.

Should we have instructions added to the documentation for pdk bundle install --local to function as expected with the right command to populate ~/.pdk/cache directory from some on-disk gems?

Additional context

  • Your PDK installation method : Native Packages
  • Your PDK version (pdk --version): 3.0.1
  • Your operating system / platform : RHEL 8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions