Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cinderhaze opened this issue Feb 13, 2024 · 0 comments
Labels
bug needs-triage Newly created issue that has not been reviewed by a PDK contributor

Comments

@Cinderhaze
Copy link

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
@Cinderhaze Cinderhaze added bug needs-triage Newly created issue that has not been reviewed by a PDK contributor labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs-triage Newly created issue that has not been reviewed by a PDK contributor
Projects
None yet
Development

No branches or pull requests

1 participant