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

Fatal Errors when trying to install missing gems during a pdk convert / validate #1244

Open
jgiorio opened this issue May 4, 2023 · 1 comment
Labels
bug community needs-triage Newly created issue that has not been reviewed by a PDK contributor

Comments

@jgiorio
Copy link

jgiorio commented May 4, 2023

Describe the bug
I am getting fatal errors when trying to run pdk convert on modules on Win 11. There is usually one or two gems required which have Native extensions and they fail to install. The error message states to run 'gem install ' which occurs successfully but the resulting attempt to run pdk validate returns the same exact error.

To Reproduce
After installing a new version of the pdk... from 1.8.1 to 2.6.1 or 2.7.1, I run pdk convert on a module. It fails to install some gems with native extensions. I have attached a bunch of files to illustrate what is going on. the metadata_before and gemfile_before show what was in those files before I ran pdk convert. After shows what is in it after. The Convert output shows the command line output of running pdk convert and how it fails on the rainbow gem. and I also provided the generated convert_report.txt in case it helps.

Expected behavior
Better error message which states how to resolve the issue. Current message gives misleading commands to run.

Additional context

  • Was on PDK 1.8.1, upgraded to 2.6.1 and then to 2.7.1 as part of troubleshooting why this wont work.
  • Installed on Win 11 via the Native Package (MSI)

Gemfile_before.txt
PDK_Convert_output.txt
metadata_before.txt
convert_report.txt
metadata_after.txt
Gemfile_after.txt

@jgiorio jgiorio added bug needs-triage Newly created issue that has not been reviewed by a PDK contributor labels May 4, 2023
@jmichaels42
Copy link

I was able to work around this by installing the same version of Ruby (w/ dev kit) included in PDK (that doesn't have dev kit). I am using PDK 2.7.1. In my case, it was the gem nokogiri that was failing to compile, so I used the Ruby w/ dev kit to compile the gem into the directory where PDK can use it:

  • install ruby for windows via exe: currently v2.7.7 w/ dev kit
  • then
    bundle install
    gem install nokogiri -i "C:\Program Files\Puppet Labs\DevelopmentKit\private\ruby\2.7.7\lib\ruby\gems\2.7.0"

This now will work:
pdk bundle install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community needs-triage Newly created issue that has not been reviewed by a PDK contributor
Projects
None yet
Development

No branches or pull requests

3 participants